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

Fix germserv service

This commit is contained in:
yalh76 2022-08-02 21:09:49 +02:00
parent 7dd95b1d74
commit 13834c0102
4 changed files with 10 additions and 8 deletions

View file

@ -7,7 +7,9 @@ Type=simple
User=__APP__
Group=__APP__
WorkingDirectory=__FINALPATH__/
ExecStartPre=-/bin/bash -c 'chown -R __APP__:__APP__ /etc/__APP__/'
ExecStartPre=+/bin/bash -c 'chown -R __APP__:__APP__ /etc/__APP__/'
ExecStartPre=+/bin/bash -c 'chmod 600 /etc/__APP__/config.toml'
ExecStartPre=+/bin/bash -c 'chmod 600 /etc/__APP__/config.d/server.toml.head'
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

View file

@ -5,7 +5,7 @@
"description": {
"en": "A gemini server written in rust."
},
"version": "0.6.6~ynh3",
"version": "0.6.6~ynh4",
"url": "https://git.sr.ht/~int80h/gemserv/",
"upstream": {
"license": "MIT",

View file

@ -83,9 +83,9 @@ chown -R $app:$app "$final_path"
#=================================================
# SPECIFIC SETUP
#=================================================
# MAKE INSTALL
# BUILD APP
#=================================================
ynh_script_progression --message="Making install..."
ynh_script_progression --message="Building app..."
# Install rustup with the toolchain needed by Gemserv
pushd "$final_path"
@ -120,7 +120,7 @@ chown -R $app:$app "/etc/$app"
ynh_add_config --template="server.toml" --destination="/etc/$app/config.d/server.toml.head"
chmod 400 "/etc/$app/config.d/server.toml.head"
chmod 600 "/etc/$app/config.d/server.toml.head"
chown $app:$app "/etc/$app/config.d/server.toml.head"
#=================================================

View file

@ -100,9 +100,9 @@ ynh_install_app_dependencies $pkg_dependencies
#=================================================
# SPECIFIC UPGRADE
#=================================================
# MAKE INSTALL
# BUILD APP
#=================================================
ynh_script_progression --message="Making install..."
ynh_script_progression --message="Building app..."
if [ "$upgrade_type" == "UPGRADE_APP" ]
then
@ -140,7 +140,7 @@ chown -R $app:$app "/etc/$app"
ynh_add_config --template="server.toml" --destination="/etc/$app/config.d/server.toml.head"
chmod 400 "/etc/$app/config.d/server.toml.head"
chmod 600 "/etc/$app/config.d/server.toml.head"
chown $app:$app "/etc/$app/config.d/server.toml.head"
#=================================================