mirror of
https://github.com/YunoHost-Apps/coturn_ynh.git
synced 2024-09-03 18:16:32 +02:00
cleaning
This commit is contained in:
parent
2e188d3e6e
commit
150c4e34f6
6 changed files with 2 additions and 18 deletions
|
@ -15,7 +15,7 @@ admindoc = "https://github.com/coturn/coturn/wiki"
|
||||||
code = "https://github.com/coturn/coturn"
|
code = "https://github.com/coturn/coturn"
|
||||||
|
|
||||||
[integration]
|
[integration]
|
||||||
yunohost = ">= 11.2.18"
|
yunohost = ">= 11.2.29"
|
||||||
helpers_version = "2.1"
|
helpers_version = "2.1"
|
||||||
architectures = "all"
|
architectures = "all"
|
||||||
multi_instance = false
|
multi_instance = false
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Keep this path for calling _common.sh inside the execution's context of backup and restore scripts
|
|
||||||
source ../settings/scripts/_common.sh
|
source ../settings/scripts/_common.sh
|
||||||
source /usr/share/yunohost/helpers
|
source /usr/share/yunohost/helpers
|
||||||
|
|
||||||
|
@ -21,17 +20,11 @@ ynh_backup "$data_dir"
|
||||||
#=================================================
|
#=================================================
|
||||||
# SPECIFIC BACKUP
|
# SPECIFIC BACKUP
|
||||||
#=================================================
|
#=================================================
|
||||||
# BACKUP LOGROTATE
|
|
||||||
#=================================================
|
|
||||||
|
|
||||||
ynh_backup "/var/log/$app"
|
ynh_backup "/var/log/$app"
|
||||||
|
|
||||||
ynh_backup "/etc/cron.d/$app"
|
ynh_backup "/etc/cron.d/$app"
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# BACKUP SYSTEMD
|
|
||||||
#=================================================
|
|
||||||
|
|
||||||
ynh_backup "/etc/systemd/system/$app.service"
|
ynh_backup "/etc/systemd/system/$app.service"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -46,7 +46,7 @@ ynh_config_add_systemd
|
||||||
#=================================================
|
#=================================================
|
||||||
# SET COTURN CONFIG
|
# SET COTURN CONFIG
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression "Configuring Coturn..."
|
ynh_script_progression "Configuring $app..."
|
||||||
|
|
||||||
# Find password for turnserver
|
# Find password for turnserver
|
||||||
turnserver_pwd=$(ynh_string_random --length=30)
|
turnserver_pwd=$(ynh_string_random --length=30)
|
||||||
|
|
|
@ -6,26 +6,20 @@ source /usr/share/yunohost/helpers
|
||||||
#=================================================
|
#=================================================
|
||||||
# STANDARD REMOVE
|
# STANDARD REMOVE
|
||||||
#=================================================
|
#=================================================
|
||||||
# REMOVE SERVICE INTEGRATION IN YUNOHOST
|
|
||||||
#=================================================
|
|
||||||
ynh_script_progression "Removing system configurations related to $app..."
|
ynh_script_progression "Removing system configurations related to $app..."
|
||||||
|
|
||||||
# Remove the service from the list of services known by YunoHost (added from `yunohost service add`)
|
|
||||||
if ynh_hide_warnings yunohost service status $app >/dev/null
|
if ynh_hide_warnings yunohost service status $app >/dev/null
|
||||||
then
|
then
|
||||||
ynh_script_progression "Removing $app service integration..."
|
ynh_script_progression "Removing $app service integration..."
|
||||||
yunohost service remove $app
|
yunohost service remove $app
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Remove the dedicated systemd config
|
|
||||||
ynh_config_remove_systemd
|
ynh_config_remove_systemd
|
||||||
|
|
||||||
ynh_safe_rm "/etc/turnserver.conf"
|
ynh_safe_rm "/etc/turnserver.conf"
|
||||||
|
|
||||||
# Remove the app-specific logrotate config
|
|
||||||
ynh_config_remove_logrotate
|
ynh_config_remove_logrotate
|
||||||
|
|
||||||
# Remove a cron file
|
|
||||||
ynh_safe_rm /etc/cron.d/$app
|
ynh_safe_rm /etc/cron.d/$app
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -33,7 +27,6 @@ ynh_safe_rm /etc/cron.d/$app
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression "Removing the dedicated system user..."
|
ynh_script_progression "Removing the dedicated system user..."
|
||||||
|
|
||||||
# Delete a system user
|
|
||||||
deluser turnserver ssl-cert
|
deluser turnserver ssl-cert
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -17,7 +17,6 @@ ynh_script_progression "Restoring the data directory..."
|
||||||
|
|
||||||
ynh_restore "$data_dir"
|
ynh_restore "$data_dir"
|
||||||
|
|
||||||
# (Same as for install dir)
|
|
||||||
chown -R $app:www-data "$data_dir"
|
chown -R $app:www-data "$data_dir"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -92,7 +92,6 @@ ynh_config_add_logrotate "/var/log/$app"
|
||||||
|
|
||||||
# Set permissions to app files
|
# Set permissions to app files
|
||||||
chown root: -R $data_dir
|
chown root: -R $data_dir
|
||||||
#REMOVEME? Assuming ynh_config_add_logrotate is called, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chown -R turnserver:root /var/log/$app
|
|
||||||
chown turnserver:root /etc/turnserver.conf
|
chown turnserver:root /etc/turnserver.conf
|
||||||
setfacl -R -m user:turnserver:rwX /var/log/$app
|
setfacl -R -m user:turnserver:rwX /var/log/$app
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue