__netbox: force link creation for config files

This adds the force flag to `ln` to avoid aborts cause the link already
exists and so forth. It also adds robustness to the execution.
This commit is contained in:
matze 2020-10-05 19:02:05 +02:00
parent 0c85b2d3fd
commit 8f1b56026c

View file

@ -48,9 +48,9 @@ cp '$src/requirements.txt' /opt/netbox/
# Deploy sources and restore configuration.
rm -r '$install_dir'
cp -r '$src/netbox' '$install_dir'
ln -s /opt/netbox/cdist/configuration.py '$install_dir/netbox/configuration.py'
ln -s /opt/netbox/cdist/ldap_config.py '$install_dir/netbox/ldap_config.py'
# force links to the cdist directory
ln -fs /opt/netbox/cdist/configuration.py '$install_dir/netbox/configuration.py'
ln -fs /opt/netbox/cdist/ldap_config.py '$install_dir/netbox/ldap_config.py'
# Setup & enter python virtualenv.