mirror of
https://github.com/YunoHost-Apps/synapse_ynh.git
synced 2024-09-03 20:26:38 +02:00
Fix Permission on restore
This commit is contained in:
parent
efc6719c86
commit
292af692cc
4 changed files with 15 additions and 7 deletions
|
@ -30,6 +30,15 @@ setup_dir() {
|
|||
mkdir -p $final_path
|
||||
}
|
||||
|
||||
set_permission() {
|
||||
# Set permission
|
||||
chown $synapse_user:root -R $final_path
|
||||
chown $synapse_user:root -R /var/lib/matrix-synapse
|
||||
chown $synapse_user:root -R /var/log/matrix-synapse
|
||||
chown turnserver:root -R /var/log/turnserver
|
||||
chown $synapse_user:root -R /etc/matrix-synapse
|
||||
}
|
||||
|
||||
install_source() {
|
||||
if [ -n "$(uname -m | grep arm)" ]
|
||||
then
|
||||
|
@ -49,13 +58,6 @@ install_source() {
|
|||
pip install --upgrade https://github.com/matrix-org/synapse/archive/v$APP_VERSION.tar.gz
|
||||
deactivate
|
||||
fi
|
||||
|
||||
# Set permission
|
||||
chown $synapse_user:root -R $final_path
|
||||
chown $synapse_user:root -R /var/lib/matrix-synapse
|
||||
chown $synapse_user:root -R /var/log/matrix-synapse
|
||||
chown turnserver:root -R /var/log/turnserver
|
||||
chown $synapse_user:root -R /etc/matrix-synapse
|
||||
}
|
||||
|
||||
config_nginx() {
|
||||
|
|
|
@ -64,6 +64,7 @@ ynh_psql_execute_as_root \
|
|||
# Create directory and Install synapse in virtualenv
|
||||
setup_dir
|
||||
install_source
|
||||
set_permission
|
||||
|
||||
# Open access to server without a button the home
|
||||
cp ../conf/add_sso_conf.py $final_path
|
||||
|
|
|
@ -40,6 +40,9 @@ ynh_system_user_create $synapse_user /var/lib/matrix-synapse
|
|||
# Restore all config and data
|
||||
ynh_restore
|
||||
|
||||
# Set the permission
|
||||
set_permission
|
||||
|
||||
# Open access to server without a button the home
|
||||
python $final_path/add_sso_conf.py
|
||||
|
||||
|
|
|
@ -67,6 +67,7 @@ then
|
|||
# Create directory Install synapse in virtualenv
|
||||
setup_dir || true # If the dir aready exist the command could fail
|
||||
install_source
|
||||
set_permission
|
||||
|
||||
# Open access to server without a button the home
|
||||
cp ../conf/add_sso_conf.py $final_path
|
||||
|
@ -123,6 +124,7 @@ test -e /var/log/turnserver || (mkdir -p /var/log/turnserver && ynh_use_logrotat
|
|||
|
||||
# Upgrade manually Synapse
|
||||
install_source
|
||||
set_permission
|
||||
|
||||
# Update nginx config
|
||||
config_nginx
|
||||
|
|
Loading…
Reference in a new issue