From 34540a2dfe0b40974292f9a64cf66a26efa4e36a Mon Sep 17 00:00:00 2001 From: Kayou Date: Fri, 15 Mar 2019 00:20:24 +0100 Subject: [PATCH 1/2] Revert "Use reload or restart during the upgrade script" This reverts commit fbcb2d376ff43a2a7d9e1d53688229d46929ebd4. --- scripts/upgrade | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index fbb6e2a..7f92867 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -189,7 +189,7 @@ yunohost service add $app --log "/var/log/$app.log" # RESTART LSTU #================================================= -ynh_systemd_action -n $app -a reload-or-restart -l "Reloaded Shortened URLs service." -p "systemd" +ynh_systemd_action -n $app -a reload -l "Reloaded Shortened URLs service." -p "systemd" #================================================= # SETUP SSOWAT From c529612862a466cc58c48d8679f558d2879dd20d Mon Sep 17 00:00:00 2001 From: Kayou Date: Fri, 15 Mar 2019 00:20:35 +0100 Subject: [PATCH 2/2] Revert "User is used instead of www-data" This reverts commit ea879356a598576953dac377ffc736b8228743dc. --- conf/systemd.service | 3 +-- scripts/install | 2 +- scripts/restore | 2 +- scripts/upgrade | 2 +- 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/conf/systemd.service b/conf/systemd.service index b489e29..f7517e1 100644 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -6,8 +6,7 @@ After=network.target [Service] Type=simple -User=__APP__ -Group=__APP__ +User=www-data RemainAfterExit=yes Restart=always RestartSec=10 diff --git a/scripts/install b/scripts/install index 6443ee8..56aefc0 100644 --- a/scripts/install +++ b/scripts/install @@ -199,7 +199,7 @@ fi # Configure owner #================================================= -chown -R $app:$app "$final_path" +chown -R www-data $final_path #================================================= # Start lstu diff --git a/scripts/restore b/scripts/restore index dca01b3..ff4b7c1 100644 --- a/scripts/restore +++ b/scripts/restore @@ -91,7 +91,7 @@ ynh_psql_connect_as $db_name $db_pwd $db_name < ./db.sql #================================================= # Restore permissions on app files -chown -R $app:$app "$final_path" +chown -R www-data $final_path #================================================= # SPECIFIC RESTORATION diff --git a/scripts/upgrade b/scripts/upgrade index 7f92867..fe98d8a 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -153,7 +153,7 @@ ynh_store_file_checksum "${final_path}/lstu.conf" # SECURING FILES AND DIRECTORIES #================================================= -chown -R $app:$app "$final_path" +chown -R www-data $final_path #================================================= # SETUP SYSTEMD