diff --git a/scripts/install b/scripts/install index 73df670..e92be28 100755 --- a/scripts/install +++ b/scripts/install @@ -89,6 +89,9 @@ ynh_script_progression --message="Adding system configurations related to $app.. ynh_add_systemd_config yunohost service add "$app" --description="$app daemon" --log="/var/log/$app/$app.log" --needs_exposed_ports="1965" +mkdir -p "/var/log/$app" +chmod 640 "/var/log/$app" + # Use logrotate to manage application logfile(s) ynh_use_logrotate diff --git a/scripts/restore b/scripts/restore index f98ec5b..31bdc39 100755 --- a/scripts/restore +++ b/scripts/restore @@ -30,6 +30,9 @@ ynh_restore_file --origin_path="/etc/systemd/system/$app.service" systemctl enable "$app.service" --quiet yunohost service add "$app" --description="$app daemon" --log="/var/log/$app/$app.log" --needs_exposed_ports="1965" +mkdir -p "/var/log/$app" +chmod 640 "/var/log/$app" + ynh_restore_file --origin_path="/etc/logrotate.d/$app" #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 178f2b5..673edf9 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -111,6 +111,9 @@ ynh_script_progression --message="Upgrading system configurations related to $ap ynh_add_systemd_config yunohost service add "$app" --description="$app daemon" --log="/var/log/$app/$app.log" --needs_exposed_ports="1965" +mkdir -p "/var/log/$app" +chmod 640 "/var/log/$app" + # Use logrotate to manage app-specific logfile(s) ynh_use_logrotate --non-append