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
|
;; Nom du test
|
||||||
# Commentaire ignoré
|
# Commentaire ignoré
|
||||||
; Manifest
|
; Manifest
|
||||||
domain="$DOMAIN" (DOMAIN)
|
domain="domain.tld" (DOMAIN)
|
||||||
path="$PATH" (PATH)
|
path="/path" (PATH)
|
||||||
admin="$USER" (USER)
|
admin="john" (USER)
|
||||||
language="fr"
|
language="fr"
|
||||||
is_public=1 (PUBLIC|public=1|private=0)
|
is_public=1 (PUBLIC|public=1|private=0)
|
||||||
password="$PASSWORD" (PASSWORD)
|
password="password"
|
||||||
port="666" (PORT)
|
port="666" (PORT)
|
||||||
; Checks
|
; Checks
|
||||||
pkg_linter=1
|
pkg_linter=1
|
||||||
|
|
|
@ -51,12 +51,12 @@ package_check/package_check.sh APP_ynh
|
||||||
;; Test name
|
;; Test name
|
||||||
# Comment ignored
|
# Comment ignored
|
||||||
; Manifest
|
; Manifest
|
||||||
domain="$DOMAIN" (DOMAIN)
|
domain="domain.tld" (DOMAIN)
|
||||||
path="$PATH" (PATH)
|
path="/path" (PATH)
|
||||||
admin="$USER" (USER)
|
admin="john" (USER)
|
||||||
language="en"
|
language="en"
|
||||||
is_public=1 (PUBLIC|public=1|private=0)
|
is_public=1 (PUBLIC|public=1|private=0)
|
||||||
password="$PASSWORD" (PASSWORD)
|
password="password"
|
||||||
port="666" (PORT)
|
port="666" (PORT)
|
||||||
; Checks
|
; Checks
|
||||||
pkg_linter=1
|
pkg_linter=1
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
language="fr"
|
language="fr"
|
||||||
# is_public="Yes" (PUBLIC|public=Yes|private=No)
|
# is_public="Yes" (PUBLIC|public=Yes|private=No)
|
||||||
is_public=1 (PUBLIC|public=1|private=0)
|
is_public=1 (PUBLIC|public=1|private=0)
|
||||||
password="pass"
|
password="password"
|
||||||
port="666" (PORT)
|
port="666" (PORT)
|
||||||
; Checks
|
; Checks
|
||||||
pkg_linter=1
|
pkg_linter=1
|
||||||
|
|
|
@ -475,6 +475,26 @@ CHECK_SETUP () {
|
||||||
local check_result_remove=-1 # Remove in sub path failed
|
local check_result_remove=-1 # Remove in sub path failed
|
||||||
fi
|
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
|
# Fill the correct variable depend on the type of test
|
||||||
if [ "$install_type" = "subdir" ]
|
if [ "$install_type" = "subdir" ]
|
||||||
then
|
then
|
||||||
|
|
Loading…
Add table
Reference in a new issue