diff --git a/check_process b/check_process index ba2cc8f..3ddc082 100644 --- a/check_process +++ b/check_process @@ -23,7 +23,6 @@ upgrade=1 from_commit=c06f6235a93587e16524fa5b124e4d9e138a8109 backup_restore=1 multi_instance=0 - port_already_use=1 change_url=1 ;;; Options Email= diff --git a/scripts/install b/scripts/install index d76b357..c32aabc 100755 --- a/scripts/install +++ b/scripts/install @@ -215,13 +215,10 @@ mkdir -p "$groups" #================================================= ynh_add_config --template="../conf/passwd" --destination="$final_path/data/passwd" -ynh_store_file_checksum --file="$final_path/data/passwd" ynh_add_config --template="../conf/groupname.json" --destination="$final_path/groups/$group_name.json" -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" #================================================= # ADD SCRIPT FOR COTURN CRON AND APP SERVICE @@ -230,8 +227,7 @@ ynh_store_file_checksum --file="$final_path/data/ice-servers.json" # WARNING : theses command are used in INSTALL, UPGRADE # For any update do it in all files -cp ../sources/Coturn_config_rotate.sh $final_path/Coturn_config_rotate.sh -ynh_replace_string --match_string=__APP__ --replace_string=$app --target_file="$final_path/Coturn_config_rotate.sh" +ynh_add_config --template="../sources/Coturn_config_rotate.sh" --destination="$final_path/Coturn_config_rotate.sh" chmod +x $final_path/Coturn_config_rotate.sh #================================================= @@ -249,6 +245,8 @@ chmod -R u=rwX,g=rX,o= /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 +chmod 600 $final_path/data/passwd +chmod 600 $final_path/data/ice-servers.json #================================================= # INTEGRATE SERVICE IN YUNOHOST diff --git a/scripts/restore b/scripts/restore index a4c0dd8..98a4eac 100755 --- a/scripts/restore +++ b/scripts/restore @@ -146,6 +146,9 @@ chmod -R u=rwX,g=rX,o= /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 +# Set permissions on config files +chmod 600 $final_path/data/passwd +chmod 600 $final_path/data/ice-servers.json #================================================= # RESTORE THE LOGROTATE CONFIGURATION diff --git a/scripts/upgrade b/scripts/upgrade index 9f75f7e..56a25d0 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -110,13 +110,11 @@ then # Remove the tmp directory securely ynh_secure_remove --file="$tmpdir" - ynh_backup_if_checksum_is_different --file="$final_path/data/passwd" ynh_add_config --template="../conf/passwd" --destination="$final_path/data/passwd" - ynh_store_file_checksum --file="$final_path/data/passwd" + chmod 600 $final_path/data/passwd - ynh_backup_if_checksum_is_different --file="$final_path/data/ice-servers.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" + chmod 600 $final_path/data/ice-servers.json # Recreate certificates pushd "$final_path/data" @@ -206,8 +204,7 @@ ynh_store_file_checksum --file="$coturn_config_path" # WARNING : theses command are used in INSTALL, UPGRADE # For any update do it in all files -cp ../sources/Coturn_config_rotate.sh $final_path/Coturn_config_rotate.sh -ynh_replace_string --match_string=__APP__ --replace_string=$app --target_file="$final_path/Coturn_config_rotate.sh" +ynh_add_config --template="../sources/Coturn_config_rotate.sh" --destination="$final_path/Coturn_config_rotate.sh" chmod +x $final_path/Coturn_config_rotate.sh #=================================================