mirror of
https://github.com/YunoHost/package_check.git
synced 2024-09-03 20:06:20 +02:00
New test reinstall after remove
This commit is contained in:
parent
b1beb0c1bd
commit
386634d751
4 changed files with 29 additions and 9 deletions
|
@ -51,12 +51,12 @@ package_check/package_check.sh APP_ynh
|
|||
;; Nom du test
|
||||
# Commentaire ignoré
|
||||
; Manifest
|
||||
domain="$DOMAIN" (DOMAIN)
|
||||
path="$PATH" (PATH)
|
||||
admin="$USER" (USER)
|
||||
domain="domain.tld" (DOMAIN)
|
||||
path="/path" (PATH)
|
||||
admin="john" (USER)
|
||||
language="fr"
|
||||
is_public=1 (PUBLIC|public=1|private=0)
|
||||
password="$PASSWORD" (PASSWORD)
|
||||
password="password"
|
||||
port="666" (PORT)
|
||||
; Checks
|
||||
pkg_linter=1
|
||||
|
|
|
@ -51,12 +51,12 @@ package_check/package_check.sh APP_ynh
|
|||
;; Test name
|
||||
# Comment ignored
|
||||
; Manifest
|
||||
domain="$DOMAIN" (DOMAIN)
|
||||
path="$PATH" (PATH)
|
||||
admin="$USER" (USER)
|
||||
domain="domain.tld" (DOMAIN)
|
||||
path="/path" (PATH)
|
||||
admin="john" (USER)
|
||||
language="en"
|
||||
is_public=1 (PUBLIC|public=1|private=0)
|
||||
password="$PASSWORD" (PASSWORD)
|
||||
password="password"
|
||||
port="666" (PORT)
|
||||
; Checks
|
||||
pkg_linter=1
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
language="fr"
|
||||
# is_public="Yes" (PUBLIC|public=Yes|private=No)
|
||||
is_public=1 (PUBLIC|public=1|private=0)
|
||||
password="pass"
|
||||
password="password"
|
||||
port="666" (PORT)
|
||||
; Checks
|
||||
pkg_linter=1
|
||||
|
|
|
@ -475,6 +475,26 @@ CHECK_SETUP () {
|
|||
local check_result_remove=-1 # Remove in sub path failed
|
||||
fi
|
||||
|
||||
# Reinstall the application after the removing
|
||||
# Try to resintall only if the first install is a success.
|
||||
if [ $check_result_setup -eq 1 ]
|
||||
then
|
||||
ECHO_FORMAT "\nReinstall the application after a removing.\n" "white" "bold" clog
|
||||
|
||||
SETUP_APP
|
||||
|
||||
# Try to access the app by its url
|
||||
CHECK_URL
|
||||
|
||||
# Check the result and print SUCCESS or FAIL
|
||||
if check_test_result
|
||||
then # Success
|
||||
local check_result_setup=1 # Installation succeed
|
||||
else # Fail
|
||||
local check_result_setup=-1 # Installation failed
|
||||
fi
|
||||
fi
|
||||
|
||||
# Fill the correct variable depend on the type of test
|
||||
if [ "$install_type" = "subdir" ]
|
||||
then
|
||||
|
|
Loading…
Add table
Reference in a new issue