diff --git a/scripts/install b/scripts/install index f3ad0ec..db6dead 100755 --- a/scripts/install +++ b/scripts/install @@ -43,6 +43,9 @@ ynh_script_progression --message="Configuring log rotation..." --weight=1 # Use logrotate to manage application logfile(s) ynh_use_logrotate +mkdir -p "/var/log/$app" +chmod 640 "/var/log/$app" + #================================================= # INTEGRATE SERVICE IN YUNOHOST #================================================= diff --git a/scripts/restore b/scripts/restore index db97eea..f0dda01 100755 --- a/scripts/restore +++ b/scripts/restore @@ -43,6 +43,9 @@ yunohost service add $app --description="Media server for your comics, manga and ynh_restore_file --origin_path="/etc/logrotate.d/$app" +mkdir -p "/var/log/$app" +chmod 640 "/var/log/$app" + #================================================= # GENERIC FINALIZATION #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 229c5d0..27cbf08 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -53,6 +53,13 @@ ynh_add_systemd_config # Use logrotate to manage app-specific logfile(s) ynh_use_logrotate --non-append +chmod 640 "/var/log/$app" + +#================================================= +# INTEGRATE SERVICE IN YUNOHOST +#================================================= +ynh_script_progression --message="Integrating service in YunoHost..." --weight=1 + yunohost service add $app --description="Media server for your comics, manga and magazines" --log="/var/log/$app/$app.log" #=================================================