From d1ad0c07a75fb96ffbed04a436abc7a30f5ac9f6 Mon Sep 17 00:00:00 2001 From: Yalh Date: Tue, 29 Jan 2019 02:13:00 +0100 Subject: [PATCH] Fix Log directory --- scripts/install | 1 + scripts/restore | 2 ++ scripts/upgrade | 4 ++++ 3 files changed, 7 insertions(+) diff --git a/scripts/install b/scripts/install index 34f4628..d22491c 100644 --- a/scripts/install +++ b/scripts/install @@ -172,6 +172,7 @@ ynh_install_nodejs 8 chown -R $app:$app $final_path +mkdir /var/log/$app chown -R $app:$app /var/log/$app pushd $final_path diff --git a/scripts/restore b/scripts/restore index 5269115..6f73070 100644 --- a/scripts/restore +++ b/scripts/restore @@ -76,6 +76,7 @@ ynh_system_user_create $app # Restore permissions on app files chown -R $app:$app $final_path +mkdir /var/log/$app chown -R $app:$app /var/log/$app #================================================= @@ -131,3 +132,4 @@ ynh_restore_file "/etc/logrotate.d/$app" #systemctl reload php5-fpm systemctl reload nginx +systemctl start $app diff --git a/scripts/upgrade b/scripts/upgrade index 45a85a5..d5f5c9a 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -74,6 +74,8 @@ path_url=$(ynh_normalize_url_path $path_url) # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= +systemctl stop $app + # Download, check integrity, uncompress and patch the source from app.src# ynh_setup_source "$final_path" @@ -145,6 +147,7 @@ ynh_add_systemd_config #chown -R root: $final_path chown -R $app:$app $final_path +mkdir /var/log/$app chown -R $app:$app /var/log/$app #================================================= @@ -163,3 +166,4 @@ fi #================================================= systemctl reload nginx +systemctl start $app