1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/woodpecker_ynh.git synced 2024-09-03 20:35:57 +02:00

Fix restore by creating /var/log/app

This commit is contained in:
Salamandar 2023-11-05 21:29:14 +01:00 committed by Salamandar
parent 7b972d59a0
commit 4347108a65
2 changed files with 12 additions and 0 deletions

View file

@ -56,6 +56,12 @@ yunohost service add "$app" --description="Woodpecker CI server" --log="/var/log
### - As well as the section "RESTORE THE LOGROTATE CONFIGURATION" in the restore script
### - And the section "SETUP LOGROTATE" in the upgrade script
# Create log file before logrotate
mkdir -p "/var/log/$app"
touch "/var/log/$app/$app.log"
chown -R "$app:$app" "/var/log/$app"
chmod -R u=rwX,g=rX,o= "/var/log/$app"
# Use logrotate to manage application logfile(s)
ynh_use_logrotate

View file

@ -40,6 +40,12 @@ systemctl enable "$app.service" --quiet
yunohost service add "$app" --description="Woodpecker CI server" --log="/var/log/$app/$app.log"
# Create log file before logrotate
mkdir -p "/var/log/$app"
touch "/var/log/$app/$app.log"
chown -R "$app:$app" "/var/log/$app"
chmod -R u=rwX,g=rX,o= "/var/log/$app"
ynh_restore_file --origin_path="/etc/logrotate.d/$app"
# ynh_restore_file --origin_path="/etc/fail2ban/jail.d/$app.conf"