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

Correct log directory for restore

This commit is contained in:
Krakinou 2018-12-28 00:17:31 +01:00
parent 44f0706c9a
commit be72d43a14
3 changed files with 34 additions and 3 deletions

View file

@ -1,5 +1,5 @@
;; Complete Test
# Comment ignored
# First Run of complete test
; Manifest
domain="domain.tld" (DOMAIN)
path="/calibre" (PATH)
@ -9,7 +9,6 @@
is_public=0 (PUBLIC|public=1|private=0)
upload=1
password="a very long password"
# port="8083" (PORT)
; Checks
pkg_linter=1
setup_sub_dir=1
@ -23,6 +22,24 @@
incorrect_path=1
port_already_use=1 (8083)
change_url=1
#;; Failed upgrade
#Run to trigger an error during upgrade to check backup_restore
# ; pre-install
# touch /tmp/upgrade_error
# ; Manifest
# domain="domain.tld" (DOMAIN)
# path="/calibre" (PATH)
# calibre_path="/home/yunohost.app/calibreweb"
# admin="john" (USER)
# language="en"
# is_public=0 (PUBLIC|public=1|private=0)
# upload=1
# password="a very long password"
# ; Checks
# setup_sub_dir=1
# setup_root=1
# upgrade=1
# upgrade=1 from_commit=3b9c5041e4fa73cb965368379f2b83d076c65341
;;; Levels
Level 1=auto
Level 2=auto
@ -40,4 +57,6 @@ Notification=none
;;; Upgrade options
; commit=3b9c5041e4fa73cb965368379f2b83d076c65341
name=Name of this previous version
manifest_arg=domain=DOMAIN&path=PATH&admin=USER&password=pass&is_public=0&
manifest_arg=domain=DOMAIN&path=PATH&admin=USER&password=pass&is_public=0&

View file

@ -110,6 +110,10 @@ systemctl enable $app.service
#=================================================
ynh_restore_file "/etc/logrotate.d/$app"
if [ ! -e /var/log/$app ]; then
mkdir /var/log/$app
fi
chown -R $app:$app /var/log/$app
#=================================================
# RESTORE THE DATA DIRECTORY

View file

@ -122,6 +122,14 @@ then
ynh_app_setting_set $app unprotected_uris "/"
fi
#=================================================
# PACKAGE_CHECK
#=================================================
#This line of code is just used to caused an error in upgrade to be tested by package_check
if [ -e /tmp/upgrade_error ]; then
exit 1
fi
#=================================================
# RELOAD NGINX
#=================================================