mirror of
https://github.com/YunoHost-Apps/galene_ynh.git
synced 2024-09-03 18:36:31 +02:00
Fix
This commit is contained in:
parent
605b83917c
commit
363602eb4c
2 changed files with 33 additions and 4 deletions
|
@ -73,8 +73,13 @@ adduser turnserver ssl-cert
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
# Restore permissions on app files
|
# Restore permissions on app files
|
||||||
|
# Set permissions on app files
|
||||||
chown -R $app: $final_path
|
chown -R $app: $final_path
|
||||||
chmod -R 755 $final_path
|
chmod -R 755 $final_path
|
||||||
|
chmod u=rwX,g=rX,o= -R /etc/$app
|
||||||
|
chmod 770 $final_path/Coturn_config_rotate.sh
|
||||||
|
setfacl -R -m user:turnserver:rX /etc/$app
|
||||||
|
setfacl -R -m user:turnserver:rwX /var/log/$app
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# SPECIFIC RESTORATION
|
# SPECIFIC RESTORATION
|
||||||
|
@ -135,7 +140,7 @@ ynh_print_ON
|
||||||
# WARNING : these commands are used in INSTALL, UPGRADE
|
# WARNING : these commands are used in INSTALL, UPGRADE
|
||||||
# For any update do it in all files
|
# For any update do it in all files
|
||||||
|
|
||||||
coturn_config_path="/etc/matrix-$app/coturn.conf"
|
coturn_config_path="/etc/$app/coturn.conf"
|
||||||
|
|
||||||
cp ../settings/conf/turnserver.conf "$coturn_config_path"
|
cp ../settings/conf/turnserver.conf "$coturn_config_path"
|
||||||
|
|
||||||
|
|
|
@ -106,7 +106,7 @@ fi
|
||||||
# MULTINSTANCE SUPPORT
|
# MULTINSTANCE SUPPORT
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
if [ ! -e /etc/matrix-$app/coturn.conf ]
|
if [ ! -e /etc/$app/coturn.conf ]
|
||||||
then
|
then
|
||||||
ynh_script_progression --message="Creating an independant service for coturn..." --weight=1
|
ynh_script_progression --message="Creating an independant service for coturn..." --weight=1
|
||||||
|
|
||||||
|
@ -187,6 +187,30 @@ ynh_store_file_checksum --file="$coturn_config_path"
|
||||||
cp ../sources/Coturn_config_rotate.sh $final_path/
|
cp ../sources/Coturn_config_rotate.sh $final_path/
|
||||||
ynh_replace_string --match_string=__APP__ --replace_string=$app --target_file="$final_path/Coturn_config_rotate.sh"
|
ynh_replace_string --match_string=__APP__ --replace_string=$app --target_file="$final_path/Coturn_config_rotate.sh"
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# MODIFY A CONFIG FILE
|
||||||
|
#=================================================
|
||||||
|
|
||||||
|
cp ../conf/passwd $final_path/data/passwd
|
||||||
|
|
||||||
|
ynh_replace_string --match_string=__ADMIN__ --replace_string=$admin --target_file="$final_path/data/passwd"
|
||||||
|
ynh_replace_string --match_string=__PASSWORD__ --replace_string=$password --target_file="$final_path/data/passwd"
|
||||||
|
|
||||||
|
mv -f $final_path/groups/groupname.json $final_path/groups/$group_name.json
|
||||||
|
|
||||||
|
ynh_replace_string --match_string=__ADMIN__ --replace_string=$admin --target_file="$final_path/groups/$group_name.json"
|
||||||
|
ynh_replace_string --match_string=__PASSWORD__ --replace_string=$password --target_file="$final_path/groups/$group_name.json"
|
||||||
|
|
||||||
|
cp ../conf/ice-servers.json $final_path/data/ice-servers.json
|
||||||
|
|
||||||
|
ynh_replace_string --match_string=__DOMAIN__ --replace_string=$domain --target_file="$final_path/data/ice-servers.json"
|
||||||
|
ynh_replace_string --match_string=__APP__ --replace_string=$app --target_file="$final_path/data/ice-servers.json"
|
||||||
|
ynh_replace_string --match_string=__TLS_PORT__ --replace_string=$turnserver_tls_port --target_file="$final_path/data/ice-servers.json"
|
||||||
|
ynh_replace_string --match_string=__TLS_ALT_PORT__ --replace_string=$turnserver_alt_tls_port --target_file="$final_path/data/ice-servers.json"
|
||||||
|
ynh_print_OFF
|
||||||
|
ynh_replace_string --match_string=__TURNPWD__ --replace_string=$turnserver_pwd --target_file="$final_path/data/ice-servers.json"
|
||||||
|
ynh_print_ON
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# NGINX CONFIGURATION
|
# NGINX CONFIGURATION
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -230,8 +254,8 @@ chown -R $app: $final_path
|
||||||
chmod -R 755 $final_path
|
chmod -R 755 $final_path
|
||||||
chmod u=rwX,g=rX,o= -R /etc/$app
|
chmod u=rwX,g=rX,o= -R /etc/$app
|
||||||
chmod 770 $final_path/Coturn_config_rotate.sh
|
chmod 770 $final_path/Coturn_config_rotate.sh
|
||||||
setfacl -R -m user:turnserver:rX /etc/matrix-$app
|
setfacl -R -m user:turnserver:rX /etc/$app
|
||||||
setfacl -R -m user:turnserver:rwX /var/log/matrix-$app
|
setfacl -R -m user:turnserver:rwX /var/log/$app
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# SETUP LOGROTATE
|
# SETUP LOGROTATE
|
||||||
|
|
Loading…
Add table
Reference in a new issue