mirror of
https://github.com/YunoHost-Apps/pyinventory_ynh.git
synced 2024-09-03 20:16:09 +02:00
fix restore: create log path and file before chown call
see: https://ci-apps.yunohost.org/ci/job/636
This commit is contained in:
parent
7ad6165486
commit
e04a518d45
2 changed files with 14 additions and 2 deletions
11
README.md
11
README.md
|
@ -70,6 +70,17 @@ To remove call e.g.:
|
|||
sudo yunohost app remove pyinventory
|
||||
```
|
||||
|
||||
Backup / remove / restore cycle, e.g.:
|
||||
```bash
|
||||
yunohost backup create --apps pyinventory
|
||||
yunohost backup list
|
||||
archives:
|
||||
- pyinventory-pre-upgrade1
|
||||
- 20201223-163434
|
||||
yunohost app remove pyinventory
|
||||
yunohost backup restore 20201223-163434 --apps pyinventory
|
||||
```
|
||||
|
||||
Debug installation, e.g.:
|
||||
```bash
|
||||
root@yunohost:~# ls -la /var/www/pyinventory/
|
||||
|
|
|
@ -70,7 +70,6 @@ ynh_system_user_create --username=$app --home_dir="$final_path" --use_shell
|
|||
#=================================================
|
||||
|
||||
# Restore permissions on app files
|
||||
chown -R "$app" "$log_path"
|
||||
chown -R "$app" "$public_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
|
||||
#=================================================
|
||||
|
||||
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"
|
||||
|
||||
#=================================================
|
||||
|
|
Loading…
Reference in a new issue