mirror of
https://github.com/YunoHost-Apps/jitsi_ynh.git
synced 2024-09-03 19:35:57 +02:00
v2
This commit is contained in:
parent
000eb0d642
commit
aa1ce5a3bc
18 changed files with 225 additions and 186 deletions
|
@ -6,8 +6,8 @@ After=network.target
|
|||
EnvironmentFile=/etc/__APP__/jicofo/config
|
||||
Environment=LOGFILE=/var/log/__APP__/jitsi-jicofo.log
|
||||
User=__APP__
|
||||
WorkingDirectory=__FINALPATH__/jitsi-jicofo/
|
||||
ExecStart=/bin/bash -c "exec __FINALPATH__/jitsi-jicofo/jicofo.sh --host=${JICOFO_HOST} --domain=${JICOFO_HOSTNAME} --user_name=${JICOFO_AUTH_USER} --user_domain=${JICOFO_AUTH_DOMAIN} --user_password=${JICOFO_AUTH_PASSWORD} ${JICOFO_OPTS} < /dev/null >> ${LOGFILE} 2>&1"
|
||||
WorkingDirectory=__INSTALL_DIR__/jitsi-jicofo/
|
||||
ExecStart=/bin/bash -c "exec __INSTALL_DIR__/jitsi-jicofo/jicofo.sh --host=${JICOFO_HOST} --domain=${JICOFO_HOSTNAME} --user_name=${JICOFO_AUTH_USER} --user_domain=${JICOFO_AUTH_DOMAIN} --user_password=${JICOFO_AUTH_PASSWORD} ${JICOFO_OPTS} < /dev/null >> ${LOGFILE} 2>&1"
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
|
|
@ -1,7 +0,0 @@
|
|||
SOURCE_URL=https://download.jitsi.org/stable/jicofo_1.0-1059-1_all.deb
|
||||
SOURCE_SUM=365051508e23ff99e3152fd3b414ec695ff920b16da9677a485f85aa91a9d549
|
||||
SOURCE_SUM_PRG=sha256sum
|
||||
SOURCE_FORMAT=deb
|
||||
SOURCE_IN_SUBDIR=true
|
||||
SOURCE_FILENAME=jitsi-jicofo.deb
|
||||
SOURCE_EXTRACT=false
|
|
@ -1,7 +0,0 @@
|
|||
SOURCE_URL=https://download.jitsi.org/stable/jitsi-meet-prosody_1.0.7712-1_all.deb
|
||||
SOURCE_SUM=30e360d42c4badf07e7269979b8af71eac05d689febc367420e0ca4abecfb16a
|
||||
SOURCE_SUM_PRG=sha256sum
|
||||
SOURCE_FORMAT=deb
|
||||
SOURCE_IN_SUBDIR=true
|
||||
SOURCE_FILENAME=jitsi-meet-prosody.deb
|
||||
SOURCE_EXTRACT=false
|
|
@ -1,7 +0,0 @@
|
|||
SOURCE_URL=https://download.jitsi.org/stable/jitsi-meet-web_1.0.7712-1_all.deb
|
||||
SOURCE_SUM=43917b5d3fd003823933d84beaf822a8a9edaa8f06f897e13b6b575bba3f3c18
|
||||
SOURCE_SUM_PRG=sha256sum
|
||||
SOURCE_FORMAT=deb
|
||||
SOURCE_IN_SUBDIR=true
|
||||
SOURCE_FILENAME=jitsi-meet-web.deb
|
||||
SOURCE_EXTRACT=false
|
|
@ -1,6 +0,0 @@
|
|||
SOURCE_URL=https://github.com/jitsi/jitsi-sctp/archive/45bf9f296167f79a52cdc1b0e93bbfa4dc8c4976.tar.gz
|
||||
SOURCE_SUM=1eead17b10d059bafe8e1b06a8351936b608e7514b131588deac61d24b859397
|
||||
SOURCE_SUM_PRG=sha256sum
|
||||
SOURCE_FORMAT=tar.gz
|
||||
SOURCE_IN_SUBDIR=true
|
||||
SOURCE_EXTRACT=true
|
|
@ -17,8 +17,8 @@ TasksMax=65000
|
|||
# allow more open files for this process
|
||||
LimitNPROC=65000
|
||||
LimitNOFILE=65000
|
||||
WorkingDirectory=__FINALPATH__/jitsi-videobridge/
|
||||
ExecStart=/bin/bash -c "exec __FINALPATH__/jitsi-videobridge/jvb.sh --host=${JVB_HOST} --domain=${JVB_HOSTNAME} --port=${JVB_PORT} --secret=${JVB_SECRET} ${JVB_OPTS} < /dev/null >> ${LOGFILE} 2>&1"
|
||||
WorkingDirectory=__INSTALL_DIR__/jitsi-videobridge/
|
||||
ExecStart=/bin/bash -c "exec __INSTALL_DIR__/jitsi-videobridge/jvb.sh --host=${JVB_HOST} --domain=${JVB_HOSTNAME} --port=${JVB_PORT} --secret=${JVB_SECRET} ${JVB_OPTS} < /dev/null >> ${LOGFILE} 2>&1"
|
||||
ExecStartPost=/bin/bash -c "echo $MAINPID > /var/run/jitsi-videobridge/jitsi-videobridge.pid"
|
||||
|
||||
[Install]
|
||||
|
|
|
@ -1,7 +0,0 @@
|
|||
SOURCE_URL=https://download.jitsi.org/stable/jitsi-videobridge2_2.3-64-g719465d1-1_all.deb
|
||||
SOURCE_SUM=cd960148768c846cc97ce37211490f5026a5c4bc81fc48ea2ea22024f83667ca
|
||||
SOURCE_SUM_PRG=sha256sum
|
||||
SOURCE_FORMAT=deb
|
||||
SOURCE_IN_SUBDIR=true
|
||||
SOURCE_FILENAME=jitsi-videobridge.deb
|
||||
SOURCE_EXTRACT=false
|
|
@ -1,7 +0,0 @@
|
|||
SOURCE_URL=https://hg.prosody.im/prosody-modules/raw-file/tip/mod_auth_ldap/mod_auth_ldap.lua
|
||||
SOURCE_SUM=49c67ec86ec75ac8de93803be2ac7f907d1e9d3d22cd4c88fd48aaeed7a411e3
|
||||
SOURCE_SUM_PRG=sha256sum
|
||||
SOURCE_FORMAT=lua
|
||||
SOURCE_IN_SUBDIR=true
|
||||
SOURCE_FILENAME=mod_auth_ldap.lua
|
||||
SOURCE_EXTRACT=false
|
|
@ -1,4 +1,4 @@
|
|||
root __FINALPATH__/jitsi-meet-web;
|
||||
root __INSTALL_DIR__/jitsi-meet-web;
|
||||
|
||||
# fix https://github.com/YunoHost-Apps/jitsi_ynh/issues/113
|
||||
more_set_headers "Content-Security-Policy: frame-ancestors 'self'";
|
||||
|
@ -15,14 +15,14 @@ location = /config.js {
|
|||
}
|
||||
|
||||
location = /external_api.js {
|
||||
alias __FINALPATH__/jitsi-meet-web/libs/external_api.min.js;
|
||||
alias __INSTALL_DIR__/jitsi-meet-web/libs/external_api.min.js;
|
||||
}
|
||||
|
||||
# ensure all static content can always be found first
|
||||
location ~ ^/(libs|css|static|images|fonts|lang|sounds|connection_optimization|.well-known)/(.*)$
|
||||
{
|
||||
more_set_headers "Access-Control-Allow-Origin: *";
|
||||
alias __FINALPATH__/jitsi-meet-web/$1/$2;
|
||||
alias __INSTALL_DIR__/jitsi-meet-web/$1/$2;
|
||||
|
||||
# cache all versioned files
|
||||
if ($arg_v) {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
plugin_paths = { "__FINALPATH__/jitsi-meet-prosody/" }
|
||||
plugin_paths = { "__INSTALL_DIR__/jitsi-meet-prosody/" }
|
||||
|
||||
-- domain mapper options, must at least have domain base set to use the mapper
|
||||
muc_mapper_domain_base = "__DOMAIN__";
|
||||
|
|
|
@ -1,6 +0,0 @@
|
|||
SOURCE_URL=https://github.com/sctplab/usrsctp/archive/8e12cd9e01fc94d2e84ea1afa351c845966e116e.tar.gz
|
||||
SOURCE_SUM=0574a31fecca543cf8e46c1bff441a3048ccf7d403da0543639db334e9a09b2f
|
||||
SOURCE_SUM_PRG=sha256sum
|
||||
SOURCE_FORMAT=tar.gz
|
||||
SOURCE_IN_SUBDIR=true
|
||||
SOURCE_EXTRACT=true
|
86
manifest.toml
Normal file
86
manifest.toml
Normal file
|
@ -0,0 +1,86 @@
|
|||
packaging_format = 2
|
||||
|
||||
id = "jitsi"
|
||||
name = "Jitsi Meet"
|
||||
description.en = "Video conferencing web application"
|
||||
description.fr = "Application web de conférence vidéo"
|
||||
|
||||
version = "2.0.9164~ynh1"
|
||||
|
||||
maintainers = ["yalh76"]
|
||||
|
||||
[upstream]
|
||||
license = "Apache-2.0"
|
||||
website = "https://jitsi.org/"
|
||||
demo = "https://meet.jit.si/"
|
||||
userdoc = "https://jitsi.org/user-faq/"
|
||||
code = "https://github.com/jitsi/jitsi-meet"
|
||||
cpe = "???" # FIXME: optional but recommended if relevant, this is meant to contain the Common Platform Enumeration, which is sort of a standard id for applications defined by the NIST. In particular, Yunohost may use this is in the future to easily track CVE (=security reports) related to apps. The CPE may be obtained by searching here: https://nvd.nist.gov/products/cpe/search. For example, for Nextcloud, the CPE is 'cpe:2.3:a:nextcloud:nextcloud' (no need to include the version number)
|
||||
fund = "???" # FIXME: optional but recommended (or remove if irrelevant / not applicable). This is meant to be an URL where people can financially support this app, especially when its development is based on volunteers and/or financed by its community. YunoHost may later advertise it in the webadmin.
|
||||
|
||||
[integration]
|
||||
yunohost = ">= 11.0.8"
|
||||
architectures = "all" # FIXME: can be replaced by a list of supported archs using the dpkg --print-architecture nomenclature (amd64/i386/armhf/arm64), for example: ["amd64", "i386"]
|
||||
multi_instance = false
|
||||
ldap = "?" # FIXME: replace with true, false, or "not_relevant". Not to confuse with the "sso" key : the "ldap" key corresponds to wether or not a user *can* login on the app using its YunoHost credentials.
|
||||
sso = "?" # FIXME: replace with true, false, or "not_relevant". Not to confuse with the "ldap" key : the "sso" key corresponds to wether or not a user is *automatically logged-in* on the app when logged-in on the YunoHost portal.
|
||||
disk = "50M" # FIXME: replace with an **estimate** minimum disk requirement. e.g. 20M, 400M, 1G, ...
|
||||
ram.build = "50M" # FIXME: replace with an **estimate** minimum ram requirement. e.g. 50M, 400M, 1G, ...
|
||||
ram.runtime = "50M" # FIXME: replace with an **estimate** minimum ram requirement. e.g. 50M, 400M, 1G, ...
|
||||
|
||||
[install.domain]
|
||||
# this is a generic question - ask strings are automatically handled by Yunohost's core
|
||||
type = "domain"
|
||||
full_domain = true
|
||||
|
||||
[resources]
|
||||
[resources.sources]
|
||||
[resources.sources.jitsi-meet-web]
|
||||
url = "https://download.jitsi.org/stable/jitsi-meet-web_1.0.7712-1_all.deb"
|
||||
sha256 = "43917b5d3fd003823933d84beaf822a8a9edaa8f06f897e13b6b575bba3f3c18"
|
||||
format = "deb"
|
||||
rename = "jitsi-meet-web.deb"
|
||||
|
||||
[resources.sources.jitsi-sctp]
|
||||
url = "https://github.com/jitsi/jitsi-sctp/archive/45bf9f296167f79a52cdc1b0e93bbfa4dc8c4976.tar.gz"
|
||||
sha256 = "1eead17b10d059bafe8e1b06a8351936b608e7514b131588deac61d24b859397"
|
||||
|
||||
[resources.sources.jitsi-jicofo]
|
||||
url = "https://download.jitsi.org/stable/jicofo_1.0-1059-1_all.deb"
|
||||
sha256 = "365051508e23ff99e3152fd3b414ec695ff920b16da9677a485f85aa91a9d549"
|
||||
format = "deb"
|
||||
rename = "jitsi-jicofo.deb"
|
||||
|
||||
[resources.sources.jitsi-videobridge]
|
||||
url = "https://download.jitsi.org/stable/jitsi-videobridge2_2.3-64-g719465d1-1_all.deb"
|
||||
sha256 = "cd960148768c846cc97ce37211490f5026a5c4bc81fc48ea2ea22024f83667ca"
|
||||
format = "deb"
|
||||
rename = "jitsi-videobridge.deb"
|
||||
|
||||
[resources.sources.usrsctp]
|
||||
url = "https://github.com/sctplab/usrsctp/archive/8e12cd9e01fc94d2e84ea1afa351c845966e116e.tar.gz"
|
||||
sha256 = "0574a31fecca543cf8e46c1bff441a3048ccf7d403da0543639db334e9a09b2f"
|
||||
|
||||
[resources.sources.jitsi-meet-prosody]
|
||||
url = "https://download.jitsi.org/stable/jitsi-meet-prosody_1.0.7712-1_all.deb"
|
||||
sha256 = "30e360d42c4badf07e7269979b8af71eac05d689febc367420e0ca4abecfb16a"
|
||||
format = "deb"
|
||||
rename = "jitsi-meet-prosody.deb"
|
||||
|
||||
[resources.sources.mod_auth_ldap]
|
||||
url = "https://hg.prosody.im/prosody-modules/raw-file/tip/mod_auth_ldap/mod_auth_ldap.lua"
|
||||
sha256 = "49c67ec86ec75ac8de93803be2ac7f907d1e9d3d22cd4c88fd48aaeed7a411e3"
|
||||
format = "lua"
|
||||
rename = "mod_auth_ldap.lua"
|
||||
|
||||
|
||||
[resources.system_user]
|
||||
|
||||
[resources.install_dir]
|
||||
|
||||
[resources.permissions]
|
||||
main.url = "/"
|
||||
[[resources.apt.extras]]
|
||||
repo = "deb http://security.debian.org/debian-security stretch/updates main"
|
||||
key = "https://ftp-master.debian.org/keys/archive-key-9-security.asc"
|
||||
packages = "#FIXME#$pkg_extra_depedencies_arm"
|
|
@ -5,14 +5,14 @@
|
|||
#=================================================
|
||||
|
||||
# dependencies used by the app
|
||||
pkg_dependencies="openjdk-8-jre-headless|openjdk-11-jre-headless|openjdk-17-jre-headless debconf|debconf-2.0 procps uuid-runtime lua-ldap"
|
||||
#REMOVEME? pkg_dependencies="openjdk-8-jre-headless|openjdk-11-jre-headless|openjdk-17-jre-headless debconf|debconf-2.0 procps uuid-runtime lua-ldap"
|
||||
|
||||
ynh_app_dependencies="prosody"
|
||||
#REMOVEME? ynh_app_dependencies="prosody"
|
||||
|
||||
if [ $YNH_ARCH == "armhf" ]
|
||||
then
|
||||
pkg_dependencies_arm="automake autoconf build-essential libtool git maven m4"
|
||||
pkg_dependencies="$pkg_dependencies $pkg_dependencies_arm"
|
||||
#REMOVEME? pkg_dependencies="$pkg_dependencies $pkg_dependencies_arm"
|
||||
|
||||
pkg_extra_depedencies_arm="openjdk-8-jre|openjdk-11-jre|openjdk-17-jre openjdk-8-jre-headless|openjdk-11-jre-headless|openjdk-17-jre-headless openjdk-8-jdk|openjdk-11-jdk|openjdk-17-jdk openjdk-8-jdk-headless|openjdk-11-jdk-headless|openjdk-17-jdk-headless"
|
||||
fi
|
||||
|
@ -56,13 +56,13 @@ ynh_jniwrapper_armhf ()
|
|||
popd
|
||||
|
||||
# rm official jniwrapper to copy
|
||||
original_jniwrapper=$(ls $final_path/jitsi-videobridge/lib/jniwrapper-native-*.jar)
|
||||
original_jniwrapper=$(ls $install_dir/jitsi-videobridge/lib/jniwrapper-native-*.jar)
|
||||
ynh_secure_remove --file="$original_jniwrapper"
|
||||
|
||||
mv "$tempdir/jitsi-sctp/jniwrapper/native/target/jniwrapper-native-1.0-SNAPSHOT.jar" "$final_path/jitsi-videobridge/lib/"
|
||||
mv "$tempdir/jitsi-sctp/jniwrapper/native/target/jniwrapper-native-1.0-SNAPSHOT.jar" "$install_dir/jitsi-videobridge/lib/"
|
||||
|
||||
chmod 640 "$final_path/jitsi-videobridge/lib/jniwrapper-native-1.0-SNAPSHOT.jar"
|
||||
chown -R $app:$app "$final_path/jitsi-videobridge/lib/jniwrapper-native-1.0-SNAPSHOT.jar"
|
||||
chmod 640 "$install_dir/jitsi-videobridge/lib/jniwrapper-native-1.0-SNAPSHOT.jar"
|
||||
chown -R $app:$app "$install_dir/jitsi-videobridge/lib/jniwrapper-native-1.0-SNAPSHOT.jar"
|
||||
|
||||
ynh_secure_remove --file="$tempdir"
|
||||
}
|
||||
|
|
|
@ -14,21 +14,21 @@ source /usr/share/yunohost/helpers
|
|||
# MANAGE SCRIPT FAILURE
|
||||
#=================================================
|
||||
|
||||
ynh_clean_setup () {
|
||||
#REMOVEME? ynh_clean_setup () {
|
||||
true
|
||||
}
|
||||
# Exit if an error occurs during the execution of the script
|
||||
ynh_abort_if_errors
|
||||
#REMOVEME? ynh_abort_if_errors
|
||||
|
||||
#=================================================
|
||||
# LOAD SETTINGS
|
||||
#=================================================
|
||||
ynh_print_info --message="Loading settings..."
|
||||
|
||||
app=$YNH_APP_INSTANCE_NAME
|
||||
#REMOVEME? app=$YNH_APP_INSTANCE_NAME
|
||||
|
||||
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
||||
domain=$(ynh_app_setting_get --app=$app --key=domain)
|
||||
#REMOVEME? #REMOVEME? install_dir=$(ynh_app_setting_get --app=$app --key=install_dir)
|
||||
#REMOVEME? domain=$(ynh_app_setting_get --app=$app --key=domain)
|
||||
|
||||
#=================================================
|
||||
# DECLARE DATA AND CONF FILES TO BACKUP
|
||||
|
@ -39,7 +39,7 @@ ynh_print_info --message="Declaring files to be backed up..."
|
|||
# BACKUP THE APP MAIN DIR
|
||||
#=================================================
|
||||
|
||||
ynh_backup --src_path="$final_path"
|
||||
ynh_backup --src_path="$install_dir"
|
||||
|
||||
#=================================================
|
||||
# BACKUP THE NGINX CONFIGURATION
|
||||
|
|
|
@ -13,20 +13,20 @@ source /usr/share/yunohost/helpers
|
|||
# MANAGE SCRIPT FAILURE
|
||||
#=================================================
|
||||
|
||||
ynh_clean_setup () {
|
||||
#REMOVEME? ynh_clean_setup () {
|
||||
true
|
||||
}
|
||||
# Exit if an error occurs during the execution of the script
|
||||
ynh_abort_if_errors
|
||||
#REMOVEME? ynh_abort_if_errors
|
||||
|
||||
#=================================================
|
||||
# RETRIEVE ARGUMENTS FROM THE MANIFEST
|
||||
#=================================================
|
||||
|
||||
domain=$YNH_APP_ARG_DOMAIN
|
||||
path_url="/"
|
||||
#REMOVEME? domain=$YNH_APP_ARG_DOMAIN
|
||||
path="/"
|
||||
|
||||
app=$YNH_APP_INSTANCE_NAME
|
||||
#REMOVEME? app=$YNH_APP_INSTANCE_NAME
|
||||
|
||||
#YOURSECRET3
|
||||
focus_password=$(ynh_string_random --length=8)
|
||||
|
@ -47,24 +47,24 @@ max_memory=200 #125 mib with no user +1,5*50 users=75 mib
|
|||
#=================================================
|
||||
# CHECK IF THE APP CAN BE INSTALLED WITH THESE ARGS
|
||||
#=================================================
|
||||
ynh_script_progression --message="Validating installation parameters..." --weight=1
|
||||
#REMOVEME? ynh_script_progression --message="Validating installation parameters..." --weight=1
|
||||
|
||||
final_path=/var/www/$app
|
||||
test ! -e "$final_path" || ynh_die --message="This path already contains a folder"
|
||||
#REMOVEME? install_dir=/var/www/$app
|
||||
#REMOVEME? test ! -e "$install_dir" || ynh_die --message="This path already contains a folder"
|
||||
|
||||
# Register (book) web path
|
||||
ynh_webpath_register --app=$app --domain=$domain --path_url=$path_url
|
||||
#REMOVEME? ynh_webpath_register --app=$app --domain=$domain --path=$path
|
||||
|
||||
#=================================================
|
||||
# STORE SETTINGS FROM MANIFEST
|
||||
#=================================================
|
||||
ynh_script_progression --message="Storing installation settings..." --weight=1
|
||||
#REMOVEME? ynh_script_progression --message="Storing installation settings..." --weight=1
|
||||
|
||||
ynh_app_setting_set --app=$app --key=domain --value=$domain
|
||||
ynh_app_setting_set --app=$app --key=path --value=$path_url
|
||||
#REMOVEME? ynh_app_setting_set --app=$app --key=domain --value=$domain
|
||||
#REMOVEME? ynh_app_setting_set --app=$app --key=path --value=$path
|
||||
ynh_app_setting_set --app=$app --key=max_memory --value=$max_memory
|
||||
ynh_app_setting_set --app=$app --key=focus_user --value=$focus_user
|
||||
ynh_app_setting_set --app=$app --key=focus_password --value=$focus_password
|
||||
#REMOVEME? ynh_app_setting_set --app=$app --key=focus_password --value=$focus_password
|
||||
ynh_app_setting_set --app=$app --key=focus_secret --value=$focus_secret
|
||||
ynh_app_setting_set --app=$app --key=videobridge_user --value=$videobridge_user
|
||||
ynh_app_setting_set --app=$app --key=videobridge_secret --value=$videobridge_secret
|
||||
|
@ -75,45 +75,45 @@ ynh_app_setting_set --app=$app --key=turn_secret --value=$turn_secret
|
|||
#=================================================
|
||||
# FIND AND OPEN A PORT
|
||||
#=================================================
|
||||
ynh_script_progression --message="Finding an available port..." --weight=1
|
||||
#REMOVEME? ynh_script_progression --message="Finding an available port..." --weight=1
|
||||
|
||||
# Find an available port
|
||||
port=4443
|
||||
# Open this port
|
||||
ynh_exec_warn_less yunohost firewall allow TCP $port
|
||||
ynh_app_setting_set --app=$app --key=port --value=$port
|
||||
#REMOVEME? ynh_app_setting_set --app=$app --key=port --value=$port
|
||||
|
||||
# Find an available port
|
||||
port_videobridge=10000
|
||||
# Open this port
|
||||
ynh_exec_warn_less yunohost firewall allow UDP $port_videobridge
|
||||
ynh_app_setting_set --app=$app --key=port_videobridge --value=$port_videobridge
|
||||
#REMOVEME? ynh_app_setting_set --app=$app --key=port_videobridge --value=$port_videobridge
|
||||
|
||||
# Find an available port
|
||||
port_component=5347
|
||||
ynh_app_setting_set --app=$app --key=port_component --value=$port_component
|
||||
#REMOVEME? ynh_app_setting_set --app=$app --key=port_component --value=$port_component
|
||||
|
||||
#=================================================
|
||||
# INSTALL DEPENDENCIES
|
||||
#=================================================
|
||||
ynh_script_progression --message="Installing dependencies..." --weight=1
|
||||
#REMOVEME? ynh_script_progression --message="Installing dependencies..." --weight=1
|
||||
|
||||
ynh_install_apps --apps="$ynh_app_dependencies"
|
||||
ynh_install_app_dependencies $pkg_dependencies
|
||||
#REMOVEME? ynh_install_app_dependencies $pkg_dependencies
|
||||
|
||||
if [ $YNH_ARCH == "armhf" ]
|
||||
then
|
||||
ynh_script_progression --message="Installing specific arm dependencies..."
|
||||
ynh_install_extra_app_dependencies --repo="deb http://security.debian.org/debian-security stretch/updates main" --package="$pkg_extra_depedencies_arm" --key="https://ftp-master.debian.org/keys/archive-key-9-security.asc"
|
||||
#REMOVEME? ynh_script_progression --message="Installing specific arm dependencies..."
|
||||
#REMOVEME? ynh_install_extra_app_dependencies --repo="deb http://security.debian.org/debian-security stretch/updates main" --package="$pkg_extra_depedencies_arm" --key="https://ftp-master.debian.org/keys/archive-key-9-security.asc"
|
||||
fi
|
||||
|
||||
#=================================================
|
||||
# CREATE DEDICATED USER
|
||||
#=================================================
|
||||
ynh_script_progression --message="Configuring system user..." --weight=1
|
||||
#REMOVEME? ynh_script_progression --message="Configuring system user..." --weight=1
|
||||
|
||||
# Create a system user
|
||||
ynh_system_user_create --username=$app --home_dir="$final_path"
|
||||
#REMOVEME? ynh_system_user_create --username=$app --home_dir="$install_dir"
|
||||
gpasswd --add prosody $app
|
||||
gpasswd --add www-data $app
|
||||
|
||||
|
@ -122,7 +122,7 @@ gpasswd --add www-data $app
|
|||
#=================================================
|
||||
ynh_script_progression --message="Setting up source files..." --weight=1
|
||||
|
||||
ynh_app_setting_set --app=$app --key=final_path --value=$final_path
|
||||
#REMOVEME? ynh_app_setting_set --app=$app --key=install_dir --value=$install_dir
|
||||
# Download, check integrity, uncompress and patch the source from app.src
|
||||
declare -A packages
|
||||
packages[jitsi-jicofo]="jicofo"
|
||||
|
@ -132,21 +132,21 @@ packages[jitsi-videobridge]="jitsi-videobridge"
|
|||
|
||||
for package in "${!packages[@]}"
|
||||
do
|
||||
ynh_setup_source --dest_dir="$final_path/${package}_temp" --source_id=$package
|
||||
pushd "$final_path/${package}_temp"
|
||||
ynh_setup_source --dest_dir="$install_dir/${package}_temp" --source_id=$package
|
||||
pushd "$install_dir/${package}_temp"
|
||||
ar x $package.deb data.tar.xz
|
||||
tar xf data.tar.xz
|
||||
popd
|
||||
|
||||
mv "$final_path/${package}_temp/usr/share/${packages[$package]}/" "$final_path/${package}/"
|
||||
ynh_secure_remove --file="$final_path/${package}_temp"
|
||||
mv "$install_dir/${package}_temp/usr/share/${packages[$package]}/" "$install_dir/${package}/"
|
||||
#REMOVEME? ynh_secure_remove --file="$install_dir/${package}_temp"
|
||||
done
|
||||
|
||||
ynh_setup_source --dest_dir="$final_path/jitsi-meet-prosody" --source_id=mod_auth_ldap
|
||||
ynh_setup_source --dest_dir="$install_dir/jitsi-meet-prosody" --source_id=mod_auth_ldap
|
||||
|
||||
chmod 750 "$final_path"
|
||||
chmod -R o-rwx "$final_path"
|
||||
chown -R $app:$app "$final_path"
|
||||
chmod 750 "$install_dir"
|
||||
chmod -R o-rwx "$install_dir"
|
||||
chown -R $app:$app "$install_dir"
|
||||
|
||||
#=================================================
|
||||
# NGINX CONFIGURATION
|
||||
|
@ -300,17 +300,17 @@ ynh_systemd_action --service_name=$app-videobridge --action="start" --log_path="
|
|||
#=================================================
|
||||
# SETUP SSOWAT
|
||||
#=================================================
|
||||
ynh_script_progression --message="Configuring permissions..." --weight=1
|
||||
#REMOVEME? ynh_script_progression --message="Configuring permissions..." --weight=1
|
||||
|
||||
# Make app public
|
||||
ynh_permission_update --permission="main" --add="visitors"
|
||||
#REMOVEME? ynh_permission_update --permission="main" --add="visitors"
|
||||
|
||||
#=================================================
|
||||
# RELOAD NGINX
|
||||
#=================================================
|
||||
ynh_script_progression --message="Reloading NGINX web server..." --weight=1
|
||||
#REMOVEME? ynh_script_progression --message="Reloading NGINX web server..." --weight=1
|
||||
|
||||
ynh_systemd_action --service_name=nginx --action=reload
|
||||
#REMOVEME? ynh_systemd_action --service_name=nginx --action=reload
|
||||
|
||||
#=================================================
|
||||
# END OF SCRIPT
|
||||
|
|
|
@ -14,15 +14,15 @@ source /usr/share/yunohost/helpers
|
|||
#=================================================
|
||||
ynh_script_progression --message="Loading settings..." --weight=1
|
||||
|
||||
app=$YNH_APP_INSTANCE_NAME
|
||||
#REMOVEME? app=$YNH_APP_INSTANCE_NAME
|
||||
|
||||
domain=$(ynh_app_setting_get --app=$app --key=domain)
|
||||
port=$(ynh_app_setting_get --app=$app --key=port)
|
||||
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
||||
port_videobridge=$(ynh_app_setting_get --app=$app --key=port_videobridge)
|
||||
port_component=$(ynh_app_setting_get --app=$app --key=port_component)
|
||||
focus_user=$(ynh_app_setting_get --app=$app --key=focus_user)
|
||||
videobridge_user=$(ynh_app_setting_get --app=$app --key=videobridge_user)
|
||||
#REMOVEME? domain=$(ynh_app_setting_get --app=$app --key=domain)
|
||||
#REMOVEME? port=$(ynh_app_setting_get --app=$app --key=port)
|
||||
#REMOVEME? #REMOVEME? install_dir=$(ynh_app_setting_get --app=$app --key=install_dir)
|
||||
#REMOVEME? port_videobridge=$(ynh_app_setting_get --app=$app --key=port_videobridge)
|
||||
#REMOVEME? port_component=$(ynh_app_setting_get --app=$app --key=port_component)
|
||||
#REMOVEME? focus_user=$(ynh_app_setting_get --app=$app --key=focus_user)
|
||||
#REMOVEME? videobridge_user=$(ynh_app_setting_get --app=$app --key=videobridge_user)
|
||||
|
||||
#=================================================
|
||||
# STANDARD REMOVE
|
||||
|
@ -90,10 +90,10 @@ ynh_systemd_action --service_name=prosody --action=restart
|
|||
#=================================================
|
||||
# REMOVE APP MAIN DIR
|
||||
#=================================================
|
||||
ynh_script_progression --message="Removing app main directory..." --weight=1
|
||||
#REMOVEME? ynh_script_progression --message="Removing app main directory..." --weight=1
|
||||
|
||||
# Remove the app directory securely
|
||||
ynh_secure_remove --file="$final_path"
|
||||
#REMOVEME? ynh_secure_remove --file="$install_dir"
|
||||
|
||||
#=================================================
|
||||
# REMOVE NGINX CONFIGURATION
|
||||
|
@ -106,10 +106,10 @@ ynh_remove_nginx_config
|
|||
#=================================================
|
||||
# REMOVE DEPENDENCIES
|
||||
#=================================================
|
||||
ynh_script_progression --message="Removing dependencies..." --weight=1
|
||||
#REMOVEME? ynh_script_progression --message="Removing dependencies..." --weight=1
|
||||
|
||||
# Remove metapackage and its dependencies
|
||||
ynh_remove_app_dependencies
|
||||
#REMOVEME? ynh_remove_app_dependencies
|
||||
|
||||
# Remove Prosody
|
||||
ynh_app_setting_delete --app=$app --key=require_prosody
|
||||
|
@ -151,11 +151,11 @@ ynh_secure_remove --file="/var/log/$app"
|
|||
#=================================================
|
||||
# REMOVE DEDICATED USER
|
||||
#=================================================
|
||||
ynh_script_progression --message="Removing the dedicated system user..." --weight=1
|
||||
#REMOVEME? ynh_script_progression --message="Removing the dedicated system user..." --weight=1
|
||||
|
||||
gpasswd --delete www-data $app
|
||||
# Delete a system user
|
||||
ynh_system_user_delete --username=$app
|
||||
#REMOVEME? ynh_system_user_delete --username=$app
|
||||
|
||||
#=================================================
|
||||
# END OF SCRIPT
|
||||
|
|
|
@ -14,51 +14,51 @@ source /usr/share/yunohost/helpers
|
|||
# MANAGE SCRIPT FAILURE
|
||||
#=================================================
|
||||
|
||||
ynh_clean_setup () {
|
||||
#REMOVEME? ynh_clean_setup () {
|
||||
true
|
||||
}
|
||||
# Exit if an error occurs during the execution of the script
|
||||
ynh_abort_if_errors
|
||||
#REMOVEME? ynh_abort_if_errors
|
||||
|
||||
#=================================================
|
||||
# LOAD SETTINGS
|
||||
#=================================================
|
||||
ynh_script_progression --message="Loading settings..." --weight=1
|
||||
|
||||
app=$YNH_APP_INSTANCE_NAME
|
||||
#REMOVEME? app=$YNH_APP_INSTANCE_NAME
|
||||
|
||||
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)
|
||||
#REMOVEME? domain=$(ynh_app_setting_get --app=$app --key=domain)
|
||||
#REMOVEME? path=$(ynh_app_setting_get --app=$app --key=path)
|
||||
#REMOVEME? #REMOVEME? install_dir=$(ynh_app_setting_get --app=$app --key=install_dir)
|
||||
|
||||
focus_user=$(ynh_app_setting_get --app=$app --key=focus_user)
|
||||
focus_password=$(ynh_app_setting_get --app=$app --key=focus_password)
|
||||
focus_secret=$(ynh_app_setting_get --app=$app --key=focus_secret)
|
||||
#REMOVEME? focus_user=$(ynh_app_setting_get --app=$app --key=focus_user)
|
||||
#REMOVEME? focus_password=$(ynh_app_setting_get --app=$app --key=focus_password)
|
||||
#REMOVEME? focus_secret=$(ynh_app_setting_get --app=$app --key=focus_secret)
|
||||
|
||||
videobridge_user=$(ynh_app_setting_get --app=$app --key=videobridge_user)
|
||||
videobridge_secret=$(ynh_app_setting_get --app=$app --key=videobridge_secret)
|
||||
#REMOVEME? videobridge_user=$(ynh_app_setting_get --app=$app --key=videobridge_user)
|
||||
#REMOVEME? videobridge_secret=$(ynh_app_setting_get --app=$app --key=videobridge_secret)
|
||||
|
||||
port=$(ynh_app_setting_get --app=$app --key=port)
|
||||
port_videobridge=$(ynh_app_setting_get --app=$app --key=port_videobridge)
|
||||
port_component=$(ynh_app_setting_get --app=$app --key=port_component)
|
||||
#REMOVEME? port=$(ynh_app_setting_get --app=$app --key=port)
|
||||
#REMOVEME? port_videobridge=$(ynh_app_setting_get --app=$app --key=port_videobridge)
|
||||
#REMOVEME? port_component=$(ynh_app_setting_get --app=$app --key=port_component)
|
||||
|
||||
#=================================================
|
||||
# CHECK IF THE APP CAN BE RESTORED
|
||||
#=================================================
|
||||
ynh_script_progression --message="Validating restoration parameters..." --weight=1
|
||||
#REMOVEME? ynh_script_progression --message="Validating restoration parameters..." --weight=1
|
||||
|
||||
test ! -d $final_path \
|
||||
|| ynh_die --message="There is already a directory: $final_path "
|
||||
#REMOVEME? test ! -d $install_dir \
|
||||
|| ynh_die --message="There is already a directory: $install_dir "
|
||||
|
||||
#=================================================
|
||||
# STANDARD RESTORATION STEPS
|
||||
#=================================================
|
||||
# RECREATE THE DEDICATED USER
|
||||
#=================================================
|
||||
ynh_script_progression --message="Recreating the dedicated system user..." --weight=1
|
||||
#REMOVEME? ynh_script_progression --message="Recreating the dedicated system user..." --weight=1
|
||||
|
||||
# Create the dedicated user (if not existing)
|
||||
ynh_system_user_create --username=$app --home_dir="$final_path"
|
||||
#REMOVEME? ynh_system_user_create --username=$app --home_dir="$install_dir"
|
||||
gpasswd --add www-data $app
|
||||
|
||||
#=================================================
|
||||
|
@ -66,27 +66,27 @@ gpasswd --add www-data $app
|
|||
#=================================================
|
||||
ynh_script_progression --message="Restoring the app main directory..." --weight=1
|
||||
|
||||
ynh_restore_file --origin_path="$final_path"
|
||||
ynh_restore_file --origin_path="$install_dir"
|
||||
|
||||
chmod 750 "$final_path"
|
||||
chmod -R o-rwx "$final_path"
|
||||
chown -R $app:$app "$final_path"
|
||||
chmod 750 "$install_dir"
|
||||
chmod -R o-rwx "$install_dir"
|
||||
chown -R $app:$app "$install_dir"
|
||||
|
||||
#=================================================
|
||||
# SPECIFIC RESTORATION
|
||||
#=================================================
|
||||
# REINSTALL DEPENDENCIES
|
||||
#=================================================
|
||||
ynh_script_progression --message="Reinstalling dependencies..." --weight=1
|
||||
#REMOVEME? ynh_script_progression --message="Reinstalling dependencies..." --weight=1
|
||||
|
||||
# Define and install dependencies
|
||||
ynh_install_apps --apps="$ynh_app_dependencies"
|
||||
ynh_install_app_dependencies $pkg_dependencies
|
||||
#REMOVEME? ynh_install_app_dependencies $pkg_dependencies
|
||||
|
||||
if [ $YNH_ARCH == "armhf" ]
|
||||
then
|
||||
ynh_script_progression --message="Installing specific arm dependencies..." --weight=1
|
||||
ynh_install_extra_app_dependencies --repo="deb http://security.debian.org/debian-security stretch/updates main" --package="$pkg_extra_depedencies_arm" --key="https://ftp-master.debian.org/keys/archive-key-9-security.asc"
|
||||
#REMOVEME? ynh_script_progression --message="Installing specific arm dependencies..." --weight=1
|
||||
#REMOVEME? ynh_install_extra_app_dependencies --repo="deb http://security.debian.org/debian-security stretch/updates main" --package="$pkg_extra_depedencies_arm" --key="https://ftp-master.debian.org/keys/archive-key-9-security.asc"
|
||||
fi
|
||||
|
||||
gpasswd --add prosody $app
|
||||
|
|
|
@ -14,27 +14,27 @@ source /usr/share/yunohost/helpers
|
|||
#=================================================
|
||||
ynh_script_progression --message="Loading settings..." --weight=1
|
||||
|
||||
app=$YNH_APP_INSTANCE_NAME
|
||||
#REMOVEME? app=$YNH_APP_INSTANCE_NAME
|
||||
|
||||
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)
|
||||
#REMOVEME? domain=$(ynh_app_setting_get --app=$app --key=domain)
|
||||
#REMOVEME? path=$(ynh_app_setting_get --app=$app --key=path)
|
||||
#REMOVEME? #REMOVEME? install_dir=$(ynh_app_setting_get --app=$app --key=install_dir)
|
||||
|
||||
max_memory=$(ynh_app_setting_get --app=$app --key=max_memory)
|
||||
#REMOVEME? max_memory=$(ynh_app_setting_get --app=$app --key=max_memory)
|
||||
|
||||
focus_user=$(ynh_app_setting_get --app=$app --key=focus_user)
|
||||
focus_password=$(ynh_app_setting_get --app=$app --key=focus_password)
|
||||
focus_secret=$(ynh_app_setting_get --app=$app --key=focus_secret)
|
||||
#REMOVEME? focus_user=$(ynh_app_setting_get --app=$app --key=focus_user)
|
||||
#REMOVEME? focus_password=$(ynh_app_setting_get --app=$app --key=focus_password)
|
||||
#REMOVEME? focus_secret=$(ynh_app_setting_get --app=$app --key=focus_secret)
|
||||
|
||||
videobridge_user=$(ynh_app_setting_get --app=$app --key=videobridge_user)
|
||||
videobridge_secret=$(ynh_app_setting_get --app=$app --key=videobridge_secret)
|
||||
#REMOVEME? videobridge_user=$(ynh_app_setting_get --app=$app --key=videobridge_user)
|
||||
#REMOVEME? videobridge_secret=$(ynh_app_setting_get --app=$app --key=videobridge_secret)
|
||||
|
||||
turn_secret=$(ynh_app_setting_get --app=$app --key=turn_secret)
|
||||
muc_nickname=$(ynh_app_setting_get --app=$app --key=muc_nickname)
|
||||
#REMOVEME? turn_secret=$(ynh_app_setting_get --app=$app --key=turn_secret)
|
||||
#REMOVEME? muc_nickname=$(ynh_app_setting_get --app=$app --key=muc_nickname)
|
||||
|
||||
port=$(ynh_app_setting_get --app=$app --key=port)
|
||||
port_videobridge=$(ynh_app_setting_get --app=$app --key=port_videobridge)
|
||||
port_component=$(ynh_app_setting_get --app=$app --key=port_component)
|
||||
#REMOVEME? port=$(ynh_app_setting_get --app=$app --key=port)
|
||||
#REMOVEME? port_videobridge=$(ynh_app_setting_get --app=$app --key=port_videobridge)
|
||||
#REMOVEME? port_component=$(ynh_app_setting_get --app=$app --key=port_component)
|
||||
|
||||
#=================================================
|
||||
# CHECK VERSION
|
||||
|
@ -47,16 +47,16 @@ current_version=$(ynh_read_manifest --manifest="/etc/yunohost/apps/$app/manifest
|
|||
#=================================================
|
||||
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
|
||||
#=================================================
|
||||
ynh_script_progression --message="Backing up the app before upgrading (may take a while)..."
|
||||
#REMOVEME? ynh_script_progression --message="Backing up the app before upgrading (may take a while)..."
|
||||
|
||||
# Backup the current version of the app
|
||||
ynh_backup_before_upgrade
|
||||
ynh_clean_setup () {
|
||||
#REMOVEME? ynh_backup_before_upgrade
|
||||
#REMOVEME? ynh_clean_setup () {
|
||||
# Restore it if the upgrade fails
|
||||
ynh_restore_upgradebackup
|
||||
#REMOVEME? ynh_restore_upgradebackup
|
||||
}
|
||||
# Exit if an error occurs during the execution of the script
|
||||
ynh_abort_if_errors
|
||||
#REMOVEME? ynh_abort_if_errors
|
||||
|
||||
#=================================================
|
||||
# STANDARD UPGRADE STEPS
|
||||
|
@ -73,10 +73,10 @@ ynh_systemd_action --service_name=$app-jicofo --action="stop" --log_path="/var/l
|
|||
#=================================================
|
||||
ynh_script_progression --message="Ensuring downward compatibility..." --weight=1
|
||||
|
||||
# If final_path doesn't exist, create it
|
||||
if [ -z "$final_path" ]; then
|
||||
final_path=/var/www/$app
|
||||
ynh_app_setting_set --app=$app --key=final_path --value=$final_path
|
||||
# If install_dir doesn't exist, create it
|
||||
if [ -z "$install_dir" ]; then
|
||||
#REMOVEME? install_dir=/var/www/$app
|
||||
#REMOVEME? ynh_app_setting_set --app=$app --key=install_dir --value=$install_dir
|
||||
fi
|
||||
|
||||
# If max_memory doesn't exist, create it and set to default 75 mb value
|
||||
|
@ -88,10 +88,10 @@ fi
|
|||
#=================================================
|
||||
# CREATE DEDICATED USER
|
||||
#=================================================
|
||||
ynh_script_progression --message="Making sure dedicated system user exists..." --weight=1
|
||||
#REMOVEME? ynh_script_progression --message="Making sure dedicated system user exists..." --weight=1
|
||||
|
||||
# Create a dedicated user (if not existing)
|
||||
ynh_system_user_create --username=$app --home_dir="$final_path"
|
||||
#REMOVEME? ynh_system_user_create --username=$app --home_dir="$install_dir"
|
||||
gpasswd --add www-data $app
|
||||
|
||||
#=================================================
|
||||
|
@ -111,36 +111,36 @@ then
|
|||
|
||||
for package in "${!packages[@]}"
|
||||
do
|
||||
ynh_secure_remove --file="$final_path/${package}"
|
||||
ynh_setup_source --dest_dir="$final_path/${package}_temp" --source_id=$package
|
||||
pushd "$final_path/${package}_temp"
|
||||
#REMOVEME? ynh_secure_remove --file="$install_dir/${package}"
|
||||
ynh_setup_source --dest_dir="$install_dir/${package}_temp" --source_id=$package
|
||||
pushd "$install_dir/${package}_temp"
|
||||
ar x $package.deb data.tar.xz
|
||||
tar xf data.tar.xz
|
||||
popd
|
||||
|
||||
mv "$final_path/${package}_temp/usr/share/${packages[$package]}/" "$final_path/${package}/"
|
||||
ynh_secure_remove --file="$final_path/${package}_temp"
|
||||
mv "$install_dir/${package}_temp/usr/share/${packages[$package]}/" "$install_dir/${package}/"
|
||||
#REMOVEME? ynh_secure_remove --file="$install_dir/${package}_temp"
|
||||
done
|
||||
|
||||
ynh_setup_source --dest_dir="$final_path/jitsi-meet-prosody" --source_id=mod_auth_ldap
|
||||
ynh_setup_source --dest_dir="$install_dir/jitsi-meet-prosody" --source_id=mod_auth_ldap
|
||||
fi
|
||||
|
||||
chmod 750 "$final_path"
|
||||
chmod -R o-rwx "$final_path"
|
||||
chown -R $app:$app "$final_path"
|
||||
chmod 750 "$install_dir"
|
||||
chmod -R o-rwx "$install_dir"
|
||||
chown -R $app:$app "$install_dir"
|
||||
|
||||
#=================================================
|
||||
# UPGRADE DEPENDENCIES
|
||||
#=================================================
|
||||
ynh_script_progression --message="Upgrading dependencies..." --weight=1
|
||||
#REMOVEME? ynh_script_progression --message="Upgrading dependencies..." --weight=1
|
||||
|
||||
ynh_install_apps --apps="$ynh_app_dependencies"
|
||||
ynh_install_app_dependencies $pkg_dependencies
|
||||
#REMOVEME? ynh_install_app_dependencies $pkg_dependencies
|
||||
|
||||
if [ $YNH_ARCH == "armhf" ]
|
||||
then
|
||||
ynh_script_progression --message="Installing specific arm dependencies..." --weight=1
|
||||
ynh_install_extra_app_dependencies --repo="deb http://security.debian.org/debian-security stretch/updates main" --package="$pkg_extra_depedencies_arm" --key="https://ftp-master.debian.org/keys/archive-key-9-security.asc"
|
||||
#REMOVEME? ynh_script_progression --message="Installing specific arm dependencies..." --weight=1
|
||||
#REMOVEME? ynh_install_extra_app_dependencies --repo="deb http://security.debian.org/debian-security stretch/updates main" --package="$pkg_extra_depedencies_arm" --key="https://ftp-master.debian.org/keys/archive-key-9-security.asc"
|
||||
fi
|
||||
|
||||
gpasswd --add prosody $app
|
||||
|
@ -288,9 +288,9 @@ ynh_systemd_action --service_name=$app-videobridge --action="start" --log_path="
|
|||
#=================================================
|
||||
# RELOAD NGINX
|
||||
#=================================================
|
||||
ynh_script_progression --message="Reloading NGINX web server..." --weight=1
|
||||
#REMOVEME? ynh_script_progression --message="Reloading NGINX web server..." --weight=1
|
||||
|
||||
ynh_systemd_action --service_name=nginx --action=reload
|
||||
#REMOVEME? ynh_systemd_action --service_name=nginx --action=reload
|
||||
|
||||
#=================================================
|
||||
# END OF SCRIPT
|
||||
|
|
Loading…
Reference in a new issue