diff --git a/conf/systemd.service b/conf/systemd.service index f7517e1..b489e29 100644 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -6,7 +6,8 @@ After=network.target [Service] Type=simple -User=www-data +User=__APP__ +Group=__APP__ RemainAfterExit=yes Restart=always RestartSec=10 diff --git a/scripts/install b/scripts/install index 6ddf10b..752d45a 100644 --- a/scripts/install +++ b/scripts/install @@ -195,7 +195,7 @@ fi # Configure owner #================================================= -chown -R www-data $final_path +chown -R $app:$app "$final_path" #================================================= # Start lstu diff --git a/scripts/restore b/scripts/restore index ff4b7c1..dca01b3 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 www-data $final_path +chown -R $app:$app "$final_path" #================================================= # SPECIFIC RESTORATION diff --git a/scripts/upgrade b/scripts/upgrade index 9ac91ee..2549c05 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 www-data $final_path +chown -R $app:$app "$final_path" #================================================= # SETUP SYSTEMD