1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/scrumblr_ynh.git synced 2024-09-03 20:16:29 +02:00

recreate log directory in case of new installation

This commit is contained in:
Tobias Ollive 2021-12-29 21:27:40 +01:00
parent 62c727f190
commit db1d2a0872
2 changed files with 7 additions and 3 deletions

View file

@ -108,7 +108,7 @@ fi
#=================================================
ynh_script_progression --message="Starting a systemd service..." --weight=5
ynh_systemd_action --service_name=$app --action="start" --log_path=systemd --line_match="Server running at port"
ynh_systemd_action --service_name=$app --action="start" --log_path=systemd --line_match="Server running at"
#=================================================
# RELOAD NGINX

View file

@ -90,15 +90,19 @@ systemctl enable "redis-$app.service" --quiet
chmod 750 "$final_path"
chmod -R o-rwx "$final_path"
chown -R $app:redis "$final_path"
chown -R $app:$app "$final_path"
#=================================================
# RESTORE THE LOGROTATE CONFIGURATION
#=================================================
ynh_script_progression --message="Restoring the logrotate configuration..." --weight=1
ynh_restore_file --origin_path="/etc/logrotate.d/$app"
# recreate log directory in case of restoring backup in a new installation
mkdir --parents /var/log/$app
chown -R $app:$app "/var/log/$app/"
ynh_restore_file --origin_path="/etc/logrotate.d/$app"
#=================================================
# INTEGRATE SERVICE IN YUNOHOST
#=================================================