1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/galene_ynh.git synced 2024-09-03 18:36:31 +02:00
This commit is contained in:
ericgaspar 2021-03-10 09:20:58 +01:00
parent 3f5f59e44e
commit 031ac1164d
No known key found for this signature in database
GPG key ID: 574F281483054D44
2 changed files with 16 additions and 13 deletions

View file

@ -153,12 +153,24 @@ ynh_script_progression --message="Configuring a systemd service..." --weight=1
# Create a dedicated systemd config
ynh_add_systemd_config
mkdir -p /var/log/$app
mkdir -p /etc/$app
# Create systemd service for turnserver
cp ../conf/coturn/default_coturn /etc/default/coturn-$app
ynh_add_systemd_config --service=coturn-$app --template=coturn-galene.service
#=================================================
# SETUP LOGROTATE
#=================================================
ynh_script_progression --message="Configuring log rotation..." --weight=1
# Create log directory
mkdir -p /var/log/$app
touch /var/log/$app/$app.log
chown $app -R /var/log/$app
# Setup logrotate
ynh_use_logrotate --logfile "/var/log/$app"
#=================================================
# SET COTURN CONFIG
#=================================================
@ -211,13 +223,6 @@ ynh_store_file_checksum --file="$final_path/groups/$group_name.json"
ynh_add_config --template="../conf/ice-servers.json" --destination="$final_path/data/ice-servers.json"
ynh_store_file_checksum --file="$final_path/data/ice-servers.json"
#=================================================
# SETUP LOGROTATE
#=================================================
ynh_script_progression --message="Configuring log rotation..." --weight=1
ynh_use_logrotate --logfile "/var/log/$app"
#=================================================
# ADD SCRIPT FOR COTURN CRON AND APP SERVICE
#=================================================
@ -236,9 +241,8 @@ chmod +x $final_path/Coturn_config_rotate.sh
#=================================================
# Set permissions to app files
chown -R $app:$app $final_path
chown -R $app: $final_path
chmod -R 755 $final_path
chown -R $app:root /var/log/$app
chown -R $app:root /etc/$app
chown turnserver:root /etc/$app/coturn.conf
chmod -R u=rwX,g=rX,o= /etc/$app

View file

@ -21,7 +21,6 @@ path_url=$(ynh_app_setting_get --app=$app --key=path)
admin=$(ynh_app_setting_get --app=$app --key=admin)
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
password=$(ynh_app_setting_get --app=$app --key=password)
group_name=$(ynh_app_setting_get --app=$app --key=group_name)
port=$(ynh_app_setting_get --app=$app --key=port)
turnserver_port=$(ynh_app_setting_get --app=$app --key=turnserver_port)
turnserver_pwd=$(ynh_app_setting_get --app=$app --key=turnserver_pwd)
@ -244,9 +243,9 @@ ynh_add_systemd_config
#=================================================
# Set permissions on app files
chown -R $app:$app $final_path
chown -R $app: $final_path
chmod -R 755 $final_path
chown -R $app:root /var/log/$app
chown -R $app /var/log/$app
chown -R $app:root /etc/$app
chown turnserver:root $coturn_config_path
chmod -R u=rwX,g=rX,o= /etc/$app