diff --git a/scripts/install b/scripts/install index 373c4a8..dabd451 100755 --- a/scripts/install +++ b/scripts/install @@ -57,6 +57,19 @@ ynh_add_systemd_config --service=coturn-$app --template=coturn-pairdrop.service yunohost service add $app --description="Local file sharing in your browser" --log="/var/log/$app/$app.log" yunohost service add coturn-$app --description="Coturn TURN server" --log="/var/log/$app/turnserver.log" --needs_exposed_ports $port_turnserver +#================================================= +# SETUP LOGROTATE +#================================================= +ynh_script_progression --message="Configuring log rotation..." --weight=1 + +# Create log directory +mkdir -p /var/log/$app +touch /var/log/$app/$app.log +chown $app -R /var/log/$app + +# Setup logrotate +ynh_use_logrotate --logfile "/var/log/$app" + #================================================= # SET COTURN CONFIG #=================================================