From 11b5ddeba8e29f2cd28edd9d8c599932fce1784f Mon Sep 17 00:00:00 2001 From: yalh76 Date: Sat, 2 Feb 2019 00:34:04 +0100 Subject: [PATCH] Fix Service logs --- scripts/install | 12 ++++++++---- scripts/restore | 7 +++++++ 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/scripts/install b/scripts/install index 68d7d70..64dc627 100644 --- a/scripts/install +++ b/scripts/install @@ -168,11 +168,15 @@ ynh_system_user_create "$app" "$final_path" #================================================= # SPECIFIC SETUP #================================================= -# ... +# CREATE LOG FOLDER #================================================= -mkdir -p /var/log/$app -chown -R $app:$app /var/log/$app +mkdir -p "/var/log/$app" +chown -R "$app":"$app" "/var/log/$app" + +#================================================= +# MAKE SETUP +#================================================= chown -R "$app":"$app" "$final_path" pushd $final_path @@ -318,4 +322,4 @@ systemctl reload nginx # START SERVICE #================================================= -ynh_systemd_action --action=start --service_name=$app --line_match="Started Distbin Service" --log_path=/var/log/syslog +ynh_systemd_action --action=start --service_name=$app diff --git a/scripts/restore b/scripts/restore index 5dba7db..9f4e9a4 100644 --- a/scripts/restore +++ b/scripts/restore @@ -131,6 +131,13 @@ ynh_restore_file "/etc/logrotate.d/$app" #systemctl reload php5-fpm systemctl reload nginx +#================================================= +# CREATE LOG FOLDER +#================================================= + +mkdir -p "/var/log/$app" +chown -R "$app":"$app" "/var/log/$app" + #================================================= # START SERVICE #=================================================