diff --git a/conf/systemd.service b/conf/systemd.service index ff44d3b..e73f58a 100644 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -8,7 +8,8 @@ User=__APP__ Group=__APP__ WorkingDirectory=__FINALPATH__/ ExecStartPre=-/bin/bash -c 'chown -R __APP__:__APP__ /etc/__APP__/' -ExecStartPre=-/bin/bash -c 'cat /etc/__APP__/config.d/*.toml > /etc/__APP__/config.toml' +ExecStartPre=-/bin/bash -c 'cp /etc/__APP__/config.d/server.toml.head /etc/__APP__/config.toml' +ExecStartPre=-/bin/bash -c 'cat /etc/__APP__/config.d/*.toml >> /etc/__APP__/config.toml' ExecStart=__FINALPATH__/live/__APP__ /etc/__APP__/config.toml StandardOutput=append:/var/log/__APP__/__APP__.log StandardError=inherit diff --git a/scripts/install b/scripts/install index 754991d..6dfd70f 100755 --- a/scripts/install +++ b/scripts/install @@ -118,10 +118,10 @@ chmod 750 "/etc/$app" chmod -R o-rwx "/etc/$app" chown -R "$app":"$app" "/etc/$app" -ynh_add_config --template="../conf/server.toml" --destination="/etc/$app/config.d/server.toml" +ynh_add_config --template="server.toml" --destination="/etc/$app/config.d/server.toml.head" -chmod 400 "/etc/$app/config.d/server.toml" -chown "$app":"$app" "/etc/$app/config.d/server.toml" +chmod 400 "/etc/$app/config.d/server.toml.head" +chown "$app":"$app" "/etc/$app/config.d/server.toml.head" #================================================= # SETUP SYSTEMD diff --git a/scripts/upgrade b/scripts/upgrade index 503e60f..de647c5 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -129,10 +129,10 @@ chmod 750 "/etc/$app" chmod -R o-rwx "/etc/$app" chown -R "$app":"$app" "/etc/$app" -ynh_add_config --template="../conf/server.toml" --destination="/etc/$app/config.d/server.toml" +ynh_add_config --template="server.toml" --destination="/etc/$app/config.d/server.toml.head" -chmod 400 "/etc/$app/config.d/server.toml" -chown "$app":"$app" "/etc/$app/config.d/server.toml" +chmod 400 "/etc/$app/config.d/server.toml.head" +chown "$app":"$app" "/etc/$app/config.d/server.toml.head" #================================================= # SETUP SYSTEMD