1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/coturn_ynh.git synced 2024-09-03 18:16:32 +02:00
This commit is contained in:
ericgaspar 2021-01-17 11:17:18 +01:00
parent e81269e2ed
commit b3717cce49
No known key found for this signature in database
GPG key ID: 574F281483054D44
4 changed files with 17 additions and 9 deletions

View file

@ -8,7 +8,7 @@
},
"version": "4.5.1.1~ynh1",
"url": "https://github.com/coturn/coturn",
"license": "MIT",
"license": "",
"maintainer": {
"name": "",
"email": ""

View file

@ -29,6 +29,17 @@ path_url="/"
app=$YNH_APP_INSTANCE_NAME
#=================================================
# CHECK IF THE APP CAN BE INSTALLED WITH THESE ARGS
#=================================================
ynh_script_progression --message="Validating installation parameters..." --weight=1
final_path=/opt/yunohost/$app
test ! -e "$final_path" || ynh_die --message="This path already contains a folder"
# Register (book) web path
ynh_webpath_register --app=$app --domain=$domain --path_url=$path_url
#=================================================
# STORE SETTINGS FROM MANIFEST
#=================================================
@ -153,11 +164,8 @@ ynh_store_file_checksum --file="$coturn_config_path"
# WARNING : theses command are used in INSTALL, UPGRADE
# For any update do it in all files
script_path=/opt/yunohost/coturn
ynh_app_setting_set --app=$app --key=script_path --value=$script_path
mkdir $script_path
cp ../sources/Coturn_config_rotate.sh $script_path/Coturn_config_rotate.sh
chmod +x $script_path/Coturn_config_rotate.sh
cp ../sources/Coturn_config_rotate.sh $final_path/Coturn_config_rotate.sh
chmod +x $final_path/Coturn_config_rotate.sh
#=================================================
# SET COTURN CRON

View file

@ -22,7 +22,7 @@ turnserver_tls_port=$(ynh_app_setting_get --app=$app --key=turnserver_tls_port)
turnserver_alt_tls_port=$(ynh_app_setting_get --app=$app --key=turnserver_alt_tls_port)
db_name=$(ynh_app_setting_get --app=$app --key=db_name)
db_user=$db_name
script_path=$(ynh_app_setting_get --app=$app --key=script_path)
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
#=================================================
# STANDARD REMOVE
@ -76,7 +76,7 @@ ynh_remove_logrotate
#=================================================
# Remove coturn/Coturn_config_rotate.sh
ynh_secure_remove --file=$script_path
ynh_secure_remove --file=$final_path
#=================================================
# REMOVE CRON JOB

View file

@ -25,7 +25,7 @@ new_config_line=$(egrep "^external-ip=.*\$" "/etc/turnserver.conf")
if [ "$old_config_line" != "$new_config_line" ]
then
systemctl restart coturn.service
systemctl restart $app.service
fi
exit 0