diff --git a/check_process b/check_process index ba0f954..1a6fd4b 100644 --- a/check_process +++ b/check_process @@ -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& \ No newline at end of file + manifest_arg=domain=DOMAIN&path=PATH&admin=USER&password=pass&is_public=0& + + \ No newline at end of file diff --git a/scripts/restore b/scripts/restore index 8cd9dcb..3c6de79 100755 --- a/scripts/restore +++ b/scripts/restore @@ -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 diff --git a/scripts/upgrade b/scripts/upgrade index 55a58b8..1dcb7e8 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -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 #=================================================