__netbox: use __systemd_unit, do not recreate existing directory
This commit is contained in:
parent
ef7a214dae
commit
47584d6da6
2 changed files with 3 additions and 4 deletions
|
@ -25,7 +25,6 @@ curl -L '$url' > '$archive'
|
|||
tar xf '$archive'
|
||||
|
||||
# Save cdist-upload configuration file.
|
||||
mkdir -p "\$tmpdir"
|
||||
cp '$install_dir/cdist/configuration.py' "\$tmpdir/configuration.py"
|
||||
cp '$install_dir/cdist/ldap_config.py' "\$tmpdir/ldap_config.py"
|
||||
|
||||
|
|
|
@ -78,9 +78,9 @@ fi
|
|||
|
||||
# Upload systemd units and gunicorn configuration.
|
||||
for unit in netbox netbox-rq; do
|
||||
__file /etc/systemd/system/$unit.service \
|
||||
--mode 644 --source "$__type/files/$unit.service" \
|
||||
--onchange 'systemctl daemon-reload'
|
||||
__systemd_unit $unit.service \
|
||||
--source "$__type/files/$unit.service" \
|
||||
--enablement-state enabled
|
||||
done
|
||||
|
||||
# Python worker configuration.
|
||||
|
|
Loading…
Reference in a new issue