1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/dato_ynh.git synced 2024-09-03 18:16:33 +02:00

Merge pull request #5 from YunoHost-Apps/testing

Fixed permissions and other small things
This commit is contained in:
Eauchat 2021-03-31 11:53:20 +00:00 committed by GitHub
commit 3dd139e6f8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 16 additions and 14 deletions

View file

@ -6,7 +6,7 @@
"en": "Store all kinds of data with an extremely customizable interface.", "en": "Store all kinds of data with an extremely customizable interface.",
"fr": "Stockez tous types de données avec une interface complètement customizable." "fr": "Stockez tous types de données avec une interface complètement customizable."
}, },
"version": "1.5.11~ynh1", "version": "1.5.11~ynh2",
"url": "https://squeak.eauchat.org/dato", "url": "https://squeak.eauchat.org/dato",
"license": "AGPL-3.0-or-later", "license": "AGPL-3.0-or-later",
"maintainer": { "maintainer": {
@ -62,7 +62,7 @@
"name": "autosync_info", "name": "autosync_info",
"type": "display_text", "type": "display_text",
"ask": { "ask": {
"en": "All the following option are useful only if you chose to enable autosynchronization. You can skip them all if you didn't.", "en": "All the following options are useful only if you chose to enable autosynchronization. You can skip them all if you didn't.",
"fr": "Les options qui suivent ne sont utiles que si vous avez choisi d'activer l'autosynchronisation. Vous pouvez toutes les ignorer si ce n'est pas le cas." "fr": "Les options qui suivent ne sont utiles que si vous avez choisi d'activer l'autosynchronisation. Vous pouvez toutes les ignorer si ce n'est pas le cas."
} }
}, },

View file

@ -75,7 +75,7 @@ fi
#================================================= #=================================================
ynh_script_progression --message="Stopping a systemd service..." --weight=1 ynh_script_progression --message="Stopping a systemd service..." --weight=1
ynh_systemd_action --service_name=$app --action="stop" --log_path="/var/log/$app/$app.log" ynh_systemd_action --service_name=$app --action="stop" --log_path="systemd"
#================================================= #=================================================
# MODIFY URL IN NGINX CONF # MODIFY URL IN NGINX CONF

View file

@ -204,12 +204,10 @@ fi
# SECURE FILES AND DIRECTORIES # SECURE FILES AND DIRECTORIES
#================================================= #=================================================
### For security reason, any app should set the permissions to root: before anything else. # Set permissions to app files (let dato write right only to what it needs to modify)
### Then, if write authorization is needed, any access should be given only to directories chown -R root: $final_path
### that really need such authorization. [ -d "$final_path/dist" ] || mkdir "$final_path/dist"
chown -R $app:$app $final_path/dist $final_path/global $final_path/config
# Set permissions to app files
chown -R "$app":"$app" $final_path
#================================================= #=================================================
# SETUP LOGROTATE # SETUP LOGROTATE

View file

@ -71,8 +71,10 @@ ynh_system_user_create --username=$app
# RESTORE USER RIGHTS # RESTORE USER RIGHTS
#================================================= #=================================================
# Restore permissions on app files # Restore permissions on app files (let dato write right only to what it needs to modify)
chown -R "$app":"$app" $final_path chown -R root: $final_path
[ -d "$final_path/dist" ] || mkdir "$final_path/dist"
chown -R $app:$app $final_path/dist $final_path/global $final_path/config
# #================================================= # #=================================================
# # RESTORE FAIL2BAN CONFIGURATION # # RESTORE FAIL2BAN CONFIGURATION

View file

@ -59,7 +59,7 @@ ynh_abort_if_errors
#================================================= #=================================================
ynh_script_progression --message="Stopping a systemd service..." --weight=1 ynh_script_progression --message="Stopping a systemd service..." --weight=1
ynh_systemd_action --service_name=$app --action="stop" --log_path="/var/log/$app/$app.log" ynh_systemd_action --service_name=$app --action="stop" --log_path="systemd"
#================================================= #=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE # DOWNLOAD, CHECK AND UNPACK SOURCE
@ -135,8 +135,10 @@ ynh_add_systemd_config --others_var="ynh_node_load_PATH"
# SECURE FILES AND DIRECTORIES # SECURE FILES AND DIRECTORIES
#================================================= #=================================================
# Set permissions on app files # Set permissions on app files (let dato write right only to what it needs to modify)
chown -R "$app":"$app" $final_path chown -R root: $final_path
[ -d "$final_path/dist" ] || mkdir "$final_path/dist"
chown -R $app:$app $final_path/dist $final_path/global $final_path/config
#================================================= #=================================================
# SETUP LOGROTATE # SETUP LOGROTATE