mirror of
https://github.com/YunoHost-Apps/outline_ynh.git
synced 2024-09-03 19:56:12 +02:00
Update restore
This commit is contained in:
parent
a2a679cf9c
commit
65950f2722
1 changed files with 29 additions and 9 deletions
|
@ -21,15 +21,6 @@ ynh_clean_setup () {
|
|||
# Exit if an error occurs during the execution of the script
|
||||
ynh_abort_if_errors
|
||||
|
||||
#=================================================
|
||||
# CHECK IF MINIO IS INSTALLED, IF NOT WARN USER
|
||||
#=================================================
|
||||
ynh_script_progression --message="Checking if MinIO is installed..." --weight=1
|
||||
|
||||
if ! yunohost app list | grep -q "id: minio"; then
|
||||
ynh_die --message="We can't restore because MinIO is not installed ! Please install MinIO first"
|
||||
fi
|
||||
|
||||
#=================================================
|
||||
# LOAD SETTINGS
|
||||
#=================================================
|
||||
|
@ -68,6 +59,35 @@ ynh_script_progression --message="Validating restoration parameters..." --weight
|
|||
test ! -d $final_path \
|
||||
|| ynh_die --message="There is already a directory: $final_path"
|
||||
|
||||
#=================================================
|
||||
# CHECK IF DEX IS INSTALLED, IF NOT INSTALL IT
|
||||
#=================================================
|
||||
ynh_script_progression --message="Installing Dex if needed..." --weight=18
|
||||
|
||||
if ! yunohost app list | grep -q "id: $dex_app"; then
|
||||
echo "Dex is not installed. Installing... "
|
||||
yunohost tools update
|
||||
if yunohost app list | grep -q "$dex_domain$dex_path"; then
|
||||
ynh_die "The domain provided for Dex is already used by another app. Please chose another one !"
|
||||
fi
|
||||
yunohost app install https://github.com/YunoHost-Apps/dex_ynh --force --args "domain=$dex_domain&path=$dex_path&OIDC_name=$oidc_name&OIDC_secret=$oidc_secret&OIDC_callback=$oidc_callback"
|
||||
|
||||
fi
|
||||
|
||||
#=================================================
|
||||
# CHECK IF MINIO IS INSTALLED, IF NOT INSTALL IT
|
||||
#=================================================
|
||||
ynh_script_progression --message="Installing MinIO if needed..." --weight=18
|
||||
|
||||
if ! yunohost app list | grep -q "id: minio"; then
|
||||
echo "MinIO is not installed. Installing... "
|
||||
yunohost tools update
|
||||
if yunohost app list | grep -q "$minio_domain"; then
|
||||
ynh_die "The domain provided for MinIO is already used by another app. Please chose another one !"
|
||||
fi
|
||||
yunohost app install https://github.com/YunoHost-Apps/minio_ynh --force --args "domain=$minio_domain&is_public=true&admin=$minio_admin&password=$minio_password"
|
||||
fi
|
||||
|
||||
#=================================================
|
||||
# STANDARD RESTORATION STEPS
|
||||
#=================================================
|
||||
|
|
Loading…
Reference in a new issue