mirror of
https://github.com/YunoHost-Apps/coturn_ynh.git
synced 2024-09-03 18:16:32 +02:00
Fix
This commit is contained in:
parent
e81269e2ed
commit
b3717cce49
4 changed files with 17 additions and 9 deletions
|
@ -8,7 +8,7 @@
|
|||
},
|
||||
"version": "4.5.1.1~ynh1",
|
||||
"url": "https://github.com/coturn/coturn",
|
||||
"license": "MIT",
|
||||
"license": "",
|
||||
"maintainer": {
|
||||
"name": "",
|
||||
"email": ""
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue