From 13834c010254948f309ed8e010f309e972f89b28 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Tue, 2 Aug 2022 21:09:49 +0200 Subject: [PATCH 1/3] Fix germserv service --- conf/systemd.service | 4 +++- manifest.json | 2 +- scripts/install | 6 +++--- scripts/upgrade | 6 +++--- 4 files changed, 10 insertions(+), 8 deletions(-) diff --git a/conf/systemd.service b/conf/systemd.service index ee193ea..13d5118 100644 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -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 diff --git a/manifest.json b/manifest.json index 5a495e0..d619f84 100644 --- a/manifest.json +++ b/manifest.json @@ -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", diff --git a/scripts/install b/scripts/install index 71ad23e..ce23e4b 100755 --- a/scripts/install +++ b/scripts/install @@ -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" #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index c94b71e..4b7ebba 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -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" #================================================= From 7a2e456bef677ae07691dd3127cf2d12a8c73100 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Tue, 2 Aug 2022 19:09:54 +0000 Subject: [PATCH 2/3] Auto-update README --- README.md | 2 +- README_fr.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 152b621..961b562 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,7 @@ A gemini server written in rust. - Reload config on SIGHUP -**Shipped version:** 0.6.6~ynh3 +**Shipped version:** 0.6.6~ynh4 ## Disclaimers / important information Please note that Gemserv uses the TCP port 1965, so you can't use it for anything else. diff --git a/README_fr.md b/README_fr.md index c447e4c..9ef9138 100644 --- a/README_fr.md +++ b/README_fr.md @@ -28,7 +28,7 @@ A gemini server written in rust. - Reload config on SIGHUP -**Version incluse :** 0.6.6~ynh3 +**Version incluse :** 0.6.6~ynh4 ## Avertissements / informations importantes Please note that Gemserv uses the TCP port 1965, so you can't use it for anything else. From e6027436bee7aea96f3c2bd3a6f65dce9e267164 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Tue, 2 Aug 2022 21:43:58 +0200 Subject: [PATCH 3/3] Update systemd.service --- conf/systemd.service | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/conf/systemd.service b/conf/systemd.service index 13d5118..3f53475 100644 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -7,9 +7,9 @@ Type=simple User=__APP__ Group=__APP__ WorkingDirectory=__FINALPATH__/ -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 '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