mirror of
https://github.com/YunoHost-Apps/django-for-runners_ynh.git
synced 2024-09-03 18:26:16 +02:00
Merge pull request #5 from YunoHost-Apps/fix-restore2
fix restore: create log path and file before chown call
This commit is contained in:
commit
90ed945d01
1 changed files with 3 additions and 2 deletions
|
@ -70,7 +70,6 @@ ynh_system_user_create --username=$app --home_dir="$final_path" --use_shell
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
# Restore permissions on app files
|
# Restore permissions on app files
|
||||||
chown -R "$app" "$log_path"
|
|
||||||
chown -R "$app" "$public_path"
|
chown -R "$app" "$public_path"
|
||||||
chown -R "$app" "$final_path"
|
chown -R "$app" "$final_path"
|
||||||
|
|
||||||
|
@ -111,7 +110,9 @@ yunohost service add $app --description="Web based management to catalog things"
|
||||||
# RESTORE THE LOGROTATE CONFIGURATION
|
# RESTORE THE LOGROTATE CONFIGURATION
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
mkdir -p "/var/log/$app"
|
mkdir -p "$log_path"
|
||||||
|
touch "${log_file}"
|
||||||
|
chown -R "$app" "$log_path"
|
||||||
ynh_restore_file --origin_path="/etc/logrotate.d/$app"
|
ynh_restore_file --origin_path="/etc/logrotate.d/$app"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
Loading…
Reference in a new issue