From 72d05c2b00fa7e674590b0743defd0cfb28afafe Mon Sep 17 00:00:00 2001 From: yalh76 Date: Sun, 30 Jan 2022 03:13:44 +0100 Subject: [PATCH] Fix step order Fix: Failed to start bazarr.service: Unit bazarr.service not found. --- conf/systemd.service | 2 ++ scripts/install | 16 ++++++++-------- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/conf/systemd.service b/conf/systemd.service index 4071d0f..d339abb 100644 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -14,6 +14,8 @@ StandardOutput=append:/var/log/__APP__/__APP__.log StandardError=inherit # Sandboxing options to harden security +# Depending on specificities of your service/app, you may need to tweak these +# .. but this should be a good baseline # Details for these options: https://www.freedesktop.org/software/systemd/man/systemd.exec.html NoNewPrivileges=yes PrivateTmp=yes diff --git a/scripts/install b/scripts/install index d922745..fa11a1b 100755 --- a/scripts/install +++ b/scripts/install @@ -116,6 +116,14 @@ pushd $final_path ynh_exec_as $app $final_path/venv/bin/pip install -r "$final_path/requirements.txt" popd +#================================================= +# SETUP SYSTEMD +#================================================= +ynh_script_progression --message="Configuring a systemd service..." --weight=1 + +# Create a dedicated systemd config +ynh_add_systemd_config + #================================================= # ADD A CONFIGURATION #================================================= @@ -139,14 +147,6 @@ ynh_add_config --template="config.ini" --destination="$final_path/data/config/co chmod 660 "$final_path/data/config/config.ini" chown $app: "$final_path/data/config/config.ini" -#================================================= -# SETUP SYSTEMD -#================================================= -ynh_script_progression --message="Configuring a systemd service..." --weight=1 - -# Create a dedicated systemd config -ynh_add_systemd_config - #================================================= # YUNOHOST MULTIMEDIA INTEGRATION #=================================================