From 47584d6da64b86a266d950a61879ccb82268d2c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timoth=C3=A9e=20Floure?= Date: Wed, 12 Aug 2020 08:58:29 +0200 Subject: [PATCH] __netbox: use __systemd_unit, do not recreate existing directory --- type/__netbox/gencode-remote | 1 - type/__netbox/manifest | 6 +++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/type/__netbox/gencode-remote b/type/__netbox/gencode-remote index e3157a9..122df96 100755 --- a/type/__netbox/gencode-remote +++ b/type/__netbox/gencode-remote @@ -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" diff --git a/type/__netbox/manifest b/type/__netbox/manifest index 32c85e3..2503bb4 100644 --- a/type/__netbox/manifest +++ b/type/__netbox/manifest @@ -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.