mirror of
https://github.com/YunoHost-Apps/prosody_ynh.git
synced 2024-09-03 20:15:57 +02:00
Merge pull request #18 from Gildas-GH/testing
Fix prosodyctl complaining about directory owner
This commit is contained in:
commit
91d12940f7
5 changed files with 7 additions and 0 deletions
|
@ -27,6 +27,8 @@ ynh_backup --src_path="$config_path"
|
|||
|
||||
ynh_backup --src_path="$data_dir" --is_big
|
||||
|
||||
ynh_backup --src_path="/var/lib/$app"
|
||||
|
||||
#=================================================
|
||||
# SPECIFIC BACKUP
|
||||
#=================================================
|
||||
|
|
|
@ -92,6 +92,7 @@ mkdir -p "/var/log/$app"
|
|||
chmod 750 "/var/log/$app"
|
||||
chmod -R o-rwx "/var/log/$app"
|
||||
chown -R $app:adm "/var/log/$app"
|
||||
chown -R $app:$app "/var/lib/$app"
|
||||
|
||||
# Use logrotate to manage application logfile(s)
|
||||
ynh_use_logrotate
|
||||
|
|
|
@ -42,6 +42,7 @@ ynh_secure_remove --file="$config_path"
|
|||
ynh_secure_remove --file="/var/log/$app"
|
||||
|
||||
ynh_secure_remove --file="/run/$app"
|
||||
ynh_secure_remove --file="/var/lib/$app"
|
||||
ynh_secure_remove --file="/usr/bin/prosody"
|
||||
ynh_secure_remove --file="/usr/bin/prosodyctl"
|
||||
ynh_secure_remove --file="/usr/bin/prosody-migrator"
|
||||
|
|
|
@ -51,8 +51,10 @@ chmod 750 "$config_path/certs"
|
|||
ynh_script_progression --message="Restoring the data directory..."
|
||||
|
||||
ynh_restore_file --origin_path="$data_dir" --not_mandatory
|
||||
ynh_restore_file --origin_path="/var/lib/$app" --not_mandatory
|
||||
|
||||
chown -R $app:$app "$data_dir"
|
||||
chown -R $app:$app "/var/lib/$app"
|
||||
|
||||
#=================================================
|
||||
# RESTORE SYSTEMD
|
||||
|
|
|
@ -112,6 +112,7 @@ mkdir -p "/var/log/$app"
|
|||
chmod 750 "/var/log/$app"
|
||||
chmod -R o-rwx "/var/log/$app"
|
||||
chown -R $app:adm "/var/log/$app"
|
||||
chown -R $app:$app "/var/lib/$app"
|
||||
|
||||
# Use logrotate to manage app-specific logfile(s)
|
||||
ynh_use_logrotate --non-append
|
||||
|
|
Loading…
Add table
Reference in a new issue