1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/pairdrop_ynh.git synced 2024-09-03 19:56:16 +02:00
This commit is contained in:
Éric Gaspar 2023-10-08 14:25:03 +02:00
parent 44d62498ed
commit 495dba0f23
2 changed files with 18 additions and 1 deletions

View file

@ -1,5 +1,5 @@
[Unit]
Description=Coturn STUN/TURN Server
Description=Coturn STUN/TURN Server for __APP__
Documentation=man:coturn(1) man:turnadmin(1) man:turnserver(1)
After=syslog.target network.target

View file

@ -44,7 +44,24 @@ ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
ynh_restore_file --origin_path="/etc/systemd/system/$app.service"
systemctl enable $app.service --quiet
ynh_restore_file --origin_path="/etc/default/coturn-$app"
ynh_restore_file --origin_path="/etc/systemd/system/coturn-$app.service"
systemctl enable coturn-$app.service --quiet
yunohost service add $app --description="Local file sharing in your browser" --log="/var/log/$app/$app.log"
yunohost service add coturn-$app --description="Coturn TURN server" --log="/var/log/$app/turnserver.log" --needs_exposed_ports $turnserver_port
#=================================================
# RESTORE USER RIGHTS
#=================================================
ynh_script_progression --message="Restoring permissions..." --weight=1
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
setfacl -R -m user:turnserver:rX /etc/$app
setfacl -R -m user:turnserver:rwX /var/log/$app
#=================================================
# GENERIC FINALIZATION