1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/gemserv_ynh.git synced 2024-09-03 18:36:27 +02:00

server.toml should always be at the beginning of config.toml

This commit is contained in:
OniriCorpe 2022-05-09 18:22:10 +02:00
parent 174df63571
commit 93aa4564d8
3 changed files with 8 additions and 7 deletions

View file

@ -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

View file

@ -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

View file

@ -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