mirror of
https://github.com/YunoHost-Apps/sogo_ynh.git
synced 2024-09-03 20:26:07 +02:00
Merge branch 'Fix-linter' of https://github.com/YunoHost-Apps/sogo_ynh into Fix-linter
This commit is contained in:
commit
9d77dc5902
5 changed files with 6 additions and 22 deletions
|
@ -5,12 +5,10 @@
|
||||||
|
|
||||||
;; Test complet
|
;; Test complet
|
||||||
; Manifest
|
; Manifest
|
||||||
domain="domain.tld" (DOMAIN)
|
domain="domain.tld"
|
||||||
path="/SOGo" (PATH)
|
path="/SOGo"
|
||||||
admin="john" (USER)
|
admin="john"
|
||||||
language="French"
|
is_public=1
|
||||||
is_public=1 (PUBLIC|public=1|private=0)
|
|
||||||
port="20000" (PORT)
|
|
||||||
; Checks
|
; Checks
|
||||||
pkg_linter=1
|
pkg_linter=1
|
||||||
setup_sub_dir=1
|
setup_sub_dir=1
|
||||||
|
@ -22,8 +20,6 @@
|
||||||
upgrade=1 from_commit=cc07f5da79498ef948c31a99f6ace9ad0a5b9ec1
|
upgrade=1 from_commit=cc07f5da79498ef948c31a99f6ace9ad0a5b9ec1
|
||||||
backup_restore=1
|
backup_restore=1
|
||||||
multi_instance=0
|
multi_instance=0
|
||||||
incorrect_path=1
|
|
||||||
port_already_use=1 (8448)
|
|
||||||
change_url=0
|
change_url=0
|
||||||
;;; Upgrade options
|
;;; Upgrade options
|
||||||
; commit=cc07f5da79498ef948c31a99f6ace9ad0a5b9ec1
|
; commit=cc07f5da79498ef948c31a99f6ace9ad0a5b9ec1
|
||||||
|
|
|
@ -19,12 +19,11 @@ ynh_script_progression --message="Loading installation settings..."
|
||||||
# RETRIEVE ARGUMENTS
|
# RETRIEVE ARGUMENTS
|
||||||
old_domain=$YNH_APP_OLD_DOMAIN
|
old_domain=$YNH_APP_OLD_DOMAIN
|
||||||
domain=$YNH_APP_NEW_DOMAIN
|
domain=$YNH_APP_NEW_DOMAIN
|
||||||
path_url=$(ynh_normalize_url_path --path_url $YNH_APP_NEW_PATH)
|
path_url=$YNH_APP_NEW_PATH
|
||||||
app=$YNH_APP_INSTANCE_NAME
|
app=$YNH_APP_INSTANCE_NAME
|
||||||
|
|
||||||
port=$(ynh_app_setting_get --app $app --key web_port)
|
port=$(ynh_app_setting_get --app $app --key web_port)
|
||||||
admin=$(ynh_app_setting_get --app $app --key admin)
|
admin=$(ynh_app_setting_get --app $app --key admin)
|
||||||
final_path=$(ynh_app_setting_get --app $app --key final_path)
|
|
||||||
|
|
||||||
# Check if the new path stay /SOGo if not exit
|
# Check if the new path stay /SOGo if not exit
|
||||||
|
|
||||||
|
|
|
@ -23,7 +23,6 @@ is_public=$YNH_APP_ARG_IS_PUBLIC
|
||||||
|
|
||||||
# Set variable
|
# Set variable
|
||||||
path_url="/SOGo"
|
path_url="/SOGo"
|
||||||
# final_path="/opt/yunohost/$app"
|
|
||||||
|
|
||||||
# Register (book) web path
|
# Register (book) web path
|
||||||
ynh_webpath_register --app $app --domain $domain --path_url $path_url
|
ynh_webpath_register --app $app --domain $domain --path_url $path_url
|
||||||
|
|
|
@ -19,7 +19,6 @@ domain=$(ynh_app_setting_get --app $app --key domain)
|
||||||
port=$(ynh_app_setting_get --app $app --key port)
|
port=$(ynh_app_setting_get --app $app --key port)
|
||||||
db_name=$(ynh_app_setting_get --app $app --key db_name)
|
db_name=$(ynh_app_setting_get --app $app --key db_name)
|
||||||
db_user=$(ynh_app_setting_get --app $app --key db_user)
|
db_user=$(ynh_app_setting_get --app $app --key db_user)
|
||||||
final_path=$(ynh_app_setting_get --app $app --key final_path)
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# STANDARD REMOVE
|
# STANDARD REMOVE
|
||||||
|
@ -33,10 +32,6 @@ ynh_remove_app_dependencies
|
||||||
ynh_script_progression --message="Removing databases..."
|
ynh_script_progression --message="Removing databases..."
|
||||||
ynh_mysql_remove_db --db_user $db_user --db_name $db_name
|
ynh_mysql_remove_db --db_user $db_user --db_name $db_name
|
||||||
|
|
||||||
# Remove the app directory securely
|
|
||||||
ynh_script_progression --message="Removing user data..."
|
|
||||||
ynh_secure_remove --file="$final_path"
|
|
||||||
|
|
||||||
ynh_script_progression --message="Removing configuration..."
|
ynh_script_progression --message="Removing configuration..."
|
||||||
|
|
||||||
# Remove sogo config
|
# Remove sogo config
|
||||||
|
|
|
@ -18,12 +18,8 @@ ynh_script_progression --message="Loading settings..."
|
||||||
|
|
||||||
domain=$(ynh_app_setting_get --app $app --key domain)
|
domain=$(ynh_app_setting_get --app $app --key domain)
|
||||||
path_url=$(ynh_app_setting_get --app $app --key path)
|
path_url=$(ynh_app_setting_get --app $app --key path)
|
||||||
final_path=$(ynh_app_setting_get --app $app --key final_path)
|
|
||||||
db_name=$(ynh_app_setting_get --app $app --key db_name)
|
db_name=$(ynh_app_setting_get --app $app --key db_name)
|
||||||
|
db_user=$db_name
|
||||||
# CHECK IF THE APP CAN BE RESTORED
|
|
||||||
ynh_webpath_available --domain $domain --path_url $path_url \
|
|
||||||
|| ynh_die --message "Path not available: ${domain}${path_url}"
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# STANDARD RESTORATION STEPS
|
# STANDARD RESTORATION STEPS
|
||||||
|
@ -39,7 +35,6 @@ ynh_restore
|
||||||
|
|
||||||
# RESTORE THE MYSQL DATABASE
|
# RESTORE THE MYSQL DATABASE
|
||||||
ynh_script_progression --message="Restoring database..." --weight=3
|
ynh_script_progression --message="Restoring database..." --weight=3
|
||||||
db_user=$db_name
|
|
||||||
db_pwd=$(ynh_app_setting_get --app $app --key mysqlpwd)
|
db_pwd=$(ynh_app_setting_get --app $app --key mysqlpwd)
|
||||||
ynh_mysql_setup_db --db_name $db_name --db_user $db_user --db_pwd $db_pwd
|
ynh_mysql_setup_db --db_name $db_name --db_user $db_user --db_pwd $db_pwd
|
||||||
ynh_mysql_connect_as --user $db_user --password $db_pwd --database $db_name < ./db.sql
|
ynh_mysql_connect_as --user $db_user --password $db_pwd --database $db_name < ./db.sql
|
||||||
|
|
Loading…
Add table
Reference in a new issue