diff --git a/scripts/install b/scripts/install index 48058fc..6bb0d35 100755 --- a/scripts/install +++ b/scripts/install @@ -48,7 +48,7 @@ chmod o-rwx "$install_dir" chown -R "$app:www-data" "$install_dir" mkdir -p "/var/log/$app" -touch "$log_file" +touch "/var/log/$app/$app.log" chmod o-rwx "/var/log/$app" chown -R "$app:$app" "/var/log/$app" @@ -99,7 +99,7 @@ ynh_script_progression --message="Adding system configurations related to $app.. ynh_add_nginx_config # Create a dedicated systemd config -ynh_add_systemd_config --service="$app" --template="systemd.service" +ynh_add_systemd_config --service="$app" --description="$app service" --template="systemd.service" yunohost service add "$app" --log="/var/log/$app/$app.log" # Use logrotate to manage app-specific logfile(s) diff --git a/scripts/restore b/scripts/restore index c49a52a..7b32ed1 100755 --- a/scripts/restore +++ b/scripts/restore @@ -42,7 +42,7 @@ ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" ynh_restore_file --origin_path="/etc/systemd/system/$app.service" systemctl enable "$app.service" --quiet -yunohost service add "$app" --description="Digital signage system for high schools" --log="/var/log/$app/$app.log" +yunohost service add "$app" --description="$app service" --log="/var/log/$app/$app.log" ynh_restore_file --origin_path="/etc/logrotate.d/$app" diff --git a/scripts/upgrade b/scripts/upgrade index 6eb2411..01e9127 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -99,7 +99,7 @@ ynh_script_progression --message="Upgrading system configurations related to $ap ynh_add_nginx_config ynh_add_systemd_config --service="$app" --template="systemd.service" -yunohost service add "$app" --description="Digital signage system for high schools" --log="/var/log/$app/$app.log" +yunohost service add "$app" --description="$app service" --log="/var/log/$app/$app.log" ynh_use_logrotate --non-append chmod o-rwx "/var/log/$app"