1
0
Fork 0
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:
ericgaspar 2022-01-16 22:25:40 +01:00
commit 9d77dc5902
No known key found for this signature in database
GPG key ID: 574F281483054D44
5 changed files with 6 additions and 22 deletions

View file

@ -5,12 +5,10 @@
;; Test complet
; Manifest
domain="domain.tld" (DOMAIN)
path="/SOGo" (PATH)
admin="john" (USER)
language="French"
is_public=1 (PUBLIC|public=1|private=0)
port="20000" (PORT)
domain="domain.tld"
path="/SOGo"
admin="john"
is_public=1
; Checks
pkg_linter=1
setup_sub_dir=1
@ -22,8 +20,6 @@
upgrade=1 from_commit=cc07f5da79498ef948c31a99f6ace9ad0a5b9ec1
backup_restore=1
multi_instance=0
incorrect_path=1
port_already_use=1 (8448)
change_url=0
;;; Upgrade options
; commit=cc07f5da79498ef948c31a99f6ace9ad0a5b9ec1

View file

@ -19,12 +19,11 @@ ynh_script_progression --message="Loading installation settings..."
# RETRIEVE ARGUMENTS
old_domain=$YNH_APP_OLD_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
port=$(ynh_app_setting_get --app $app --key web_port)
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

View file

@ -23,7 +23,6 @@ is_public=$YNH_APP_ARG_IS_PUBLIC
# Set variable
path_url="/SOGo"
# final_path="/opt/yunohost/$app"
# Register (book) web path
ynh_webpath_register --app $app --domain $domain --path_url $path_url

View file

@ -19,7 +19,6 @@ domain=$(ynh_app_setting_get --app $app --key domain)
port=$(ynh_app_setting_get --app $app --key port)
db_name=$(ynh_app_setting_get --app $app --key db_name)
db_user=$(ynh_app_setting_get --app $app --key db_user)
final_path=$(ynh_app_setting_get --app $app --key final_path)
#=================================================
# STANDARD REMOVE
@ -33,10 +32,6 @@ ynh_remove_app_dependencies
ynh_script_progression --message="Removing databases..."
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..."
# Remove sogo config

View file

@ -18,12 +18,8 @@ ynh_script_progression --message="Loading settings..."
domain=$(ynh_app_setting_get --app $app --key domain)
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)
# 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}"
db_user=$db_name
#=================================================
# STANDARD RESTORATION STEPS
@ -39,7 +35,6 @@ ynh_restore
# RESTORE THE MYSQL DATABASE
ynh_script_progression --message="Restoring database..." --weight=3
db_user=$db_name
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_connect_as --user $db_user --password $db_pwd --database $db_name < ./db.sql