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" #=================================================