mirror of
https://github.com/YunoHost-Apps/domoticz_ynh.git
synced 2024-09-03 18:26:17 +02:00
Correct bad log folder
This commit is contained in:
parent
999c6f2a1a
commit
6af23f3d4d
2 changed files with 6 additions and 2 deletions
|
@ -206,7 +206,7 @@ mkdir -p /var/log/"$app"
|
|||
chown -R domoticz: /var/log/"$app"
|
||||
|
||||
# Use logrotate to manage application logfile(s)
|
||||
ynh_use_logrotate --logfile="/var/log/$app/$app"
|
||||
ynh_use_logrotate --logfile="/var/log/$app/$app.log"
|
||||
[[ ! -z "$mqtt_domain" ]] && ynh_use_logrotate --logfile="/var/log/mosquitto/"
|
||||
|
||||
#=================================================
|
||||
|
|
|
@ -147,6 +147,10 @@ if [ ! -z "$mqtt_domain" ]; then
|
|||
fi
|
||||
fi
|
||||
|
||||
#remove unwanted log folder
|
||||
if [-d "/var/log/$app/$app" ]; then
|
||||
rm -r "/var/log/$app/$app"
|
||||
fi
|
||||
|
||||
#=================================================
|
||||
# CREATE DEDICATED USER
|
||||
|
@ -260,7 +264,7 @@ mkdir -p /var/log/"$app"
|
|||
chown -R domoticz: /var/log/"$app"
|
||||
|
||||
# Use logrotate to manage app-specific logfile(s)
|
||||
ynh_use_logrotate --logfile="/var/log/$app/$app" --non-append
|
||||
ynh_use_logrotate --logfile="/var/log/$app/$app.log" --non-append
|
||||
[[ ! -z "$mqtt_domain" ]] && ynh_use_logrotate --logfile="/var/log/mosquitto/" --non-append
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue