mirror of
https://github.com/YunoHost-Apps/jitsi_ynh.git
synced 2024-09-03 19:35:57 +02:00
Implement prosody_ynh
This commit is contained in:
parent
dc234cbc23
commit
7cfb08f7bf
4 changed files with 38 additions and 5 deletions
|
@ -99,9 +99,13 @@ ynh_install_app_dependencies $pkg_dependencies
|
|||
|
||||
if ! yunohost app list | grep -q "prosody"
|
||||
then
|
||||
yunohost app install prosody --args "domain=$domain&admin=$admin&language=$language&password=$password"
|
||||
yunohost app install prosody --force
|
||||
else
|
||||
yunohost app upgrade prosody --force
|
||||
fi
|
||||
|
||||
ynh_app_setting_set --app=$app --key=require_prosody --value="1"
|
||||
|
||||
#=================================================
|
||||
# CREATE DEDICATED USER
|
||||
#=================================================
|
||||
|
|
|
@ -111,6 +111,31 @@ ynh_script_progression --message="Removing dependencies..."
|
|||
# Remove metapackage and its dependencies
|
||||
ynh_remove_app_dependencies
|
||||
|
||||
# Remove the line for this app
|
||||
ynh_app_setting_delete --app=$app --key=require_prosody
|
||||
|
||||
# List apps requiring Prosody
|
||||
installed_apps=$(yunohost app list | grep -oP 'id: \K.*$')
|
||||
required_by=""
|
||||
installed_app_required_by=""
|
||||
for installed_app in $installed_apps
|
||||
do
|
||||
installed_app_required_by=$(ynh_app_setting_get --app=$installed_app --key="require_prosody")
|
||||
if [[ $installed_app_required_by ]]
|
||||
then
|
||||
required_by="${installed_app_required_by}"
|
||||
fi
|
||||
installed_app_required_by=""
|
||||
done
|
||||
|
||||
# If Prosody is no more required
|
||||
if [[ ! $required_by ]]
|
||||
then
|
||||
# Remove Prosody
|
||||
ynh_print_info --message="Removing of Prosody"
|
||||
yunohost app remove prosody --purge
|
||||
fi
|
||||
|
||||
#=================================================
|
||||
# CLOSE A PORT
|
||||
#=================================================
|
||||
|
|
|
@ -88,9 +88,13 @@ ynh_install_app_dependencies $pkg_dependencies
|
|||
|
||||
if ! yunohost app list | grep -q "prosody"
|
||||
then
|
||||
yunohost app install prosody --args "domain=$domain&admin=$admin&language=$language&password=$password"
|
||||
yunohost app install prosody --force
|
||||
else
|
||||
yunohost app upgrade prosody --force
|
||||
fi
|
||||
|
||||
ynh_app_setting_set --app=$app --key=require_prosody --value="1"
|
||||
|
||||
#=================================================
|
||||
# CONFIGURE FIREWALL
|
||||
#=================================================
|
||||
|
|
|
@ -129,9 +129,9 @@ ynh_install_app_dependencies $pkg_dependencies
|
|||
|
||||
if ! yunohost app list | grep -q "prosody"
|
||||
then
|
||||
yunohost app install prosody --args "domain=$domain&admin=$admin&language=$language&password=$password"
|
||||
elfi
|
||||
yunohost app upgrade
|
||||
yunohost app install prosody --force
|
||||
else
|
||||
yunohost app upgrade prosody --force
|
||||
fi
|
||||
|
||||
#=================================================
|
||||
|
|
Loading…
Add table
Reference in a new issue