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 15:42:22 +01:00
parent 0b82b583e9
commit 4197b58b7b
No known key found for this signature in database
GPG key ID: 574F281483054D44
3 changed files with 3 additions and 6 deletions

View file

@ -1,3 +1,2 @@
# Check if the IP as not changed at every 15th minute # Check if the IP as not changed at every 15th minute
# */15 * * * * root bash /__SCRIPT_PATH__/Coturn_config_rotate.sh; */15 * * * * root bash /__DATA_PATH__/Coturn_config_rotate.sh;
*/15 * * * * __USER__ bash /__DATA_PATH__/Coturn_config_rotate.sh;

View file

@ -145,7 +145,6 @@ fi
ynh_store_file_checksum --file="$coturn_config_path" ynh_store_file_checksum --file="$coturn_config_path"
#================================================= #=================================================
# ADD SCRIPT FOR COTURN CRON # ADD SCRIPT FOR COTURN CRON
#================================================= #=================================================
@ -162,7 +161,6 @@ chmod +x $data_path/Coturn_config_rotate.sh
#================================================= #=================================================
cp -f ../conf/cron_coturn /etc/cron.d/$app cp -f ../conf/cron_coturn /etc/cron.d/$app
ynh_replace_string --match_string="__USER__" --replace_string=turnserver --target_file=/etc/cron.d/$app
ynh_replace_string --match_string="__DATA_PATH__" --replace_string=$data_path --target_file=/etc/cron.d/$app ynh_replace_string --match_string="__DATA_PATH__" --replace_string=$data_path --target_file=/etc/cron.d/$app
#================================================= #=================================================
@ -179,7 +177,7 @@ ynh_use_logrotate
#================================================= #=================================================
# Set permissions to app files # Set permissions to app files
chown turnserver: -R $data_path chown root: -R $data_path
chown -R root /var/log/$app chown -R root /var/log/$app
setfacl -R -m user:turnserver:rwX /var/log/$app setfacl -R -m user:turnserver:rwX /var/log/$app

View file

@ -52,7 +52,7 @@ ynh_remove_app_dependencies
#================================================= #=================================================
# REMOVE APP MAIN DIR # REMOVE APP MAIN DIR
#================================================= #=================================================
ynh_script_progression --message="Removing Coturn main directory..." --weight=2 ynh_script_progression --message="Removing Coturn configuration file..." --weight=2
ynh_secure_remove --file="/etc/turnserver.conf" ynh_secure_remove --file="/etc/turnserver.conf"
mv /etc/turnserver.conf.orig /etc/turnserver.conf mv /etc/turnserver.conf.orig /etc/turnserver.conf