mirror of
https://github.com/YunoHost-Apps/my_capsule_ynh.git
synced 2024-09-03 19:46:21 +02:00
commit
31629d4fcd
7 changed files with 40 additions and 35 deletions
|
@ -17,7 +17,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in
|
|||
|
||||
Custom Gemini capsule with SFTP access and HtmGem to make your Gemini pages reachable on the web.
|
||||
|
||||
**Shipped version:** 1.4.0~ynh1
|
||||
**Shipped version:** 1.4.0~ynh2
|
||||
|
||||
**Demo:** https://gmi.sbgodin.fr/htmgem/
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour
|
|||
|
||||
|
||||
|
||||
**Version incluse :** 1.4.0~ynh1
|
||||
**Version incluse :** 1.4.0~ynh2
|
||||
|
||||
**Démo :** https://gmi.sbgodin.fr/htmgem/
|
||||
|
||||
|
|
|
@ -14,6 +14,8 @@
|
|||
setup_private=1
|
||||
setup_public=1
|
||||
upgrade=1
|
||||
# 1.4.0~ynh1
|
||||
upgrade=1 from_commit=fb4715fb8e60e6daddf6652bf563ad7c231deb74
|
||||
backup_restore=1
|
||||
multi_instance=1
|
||||
port_already_use=0
|
||||
|
@ -44,5 +46,5 @@
|
|||
Email=
|
||||
Notification=none
|
||||
;;; Upgrade options
|
||||
; commit=CommitHash
|
||||
name=Name and date of the commit.
|
||||
; commit=fb4715fb8e60e6daddf6652bf563ad7c231deb74
|
||||
name=1.4.0~ynh1.
|
||||
|
|
|
@ -5,8 +5,8 @@
|
|||
"description": {
|
||||
"en": "Custom Gemini capsule with SFTP access and HtmGem to make your Gemini pages reachable on the web."
|
||||
},
|
||||
"version": "1.4.0~ynh1",
|
||||
"url": "https://github.com/YunoHost-Apps/my_capsule_ynh",
|
||||
"version": "1.4.0~ynh2",
|
||||
"url": "https://tildegit.org/Sbgodin/htmgem",
|
||||
"upstream": {
|
||||
"license": "GPL-3.0-only",
|
||||
"demo": "https://gmi.sbgodin.fr/htmgem/",
|
||||
|
@ -56,10 +56,6 @@
|
|||
"name": "password",
|
||||
"type": "password",
|
||||
"optional": true,
|
||||
"help": {
|
||||
"en": "Use the help field to add an information for the admin about this question.",
|
||||
"fr": "Utilisez le champ aide pour ajouter une information à l'intention de l'administrateur à propos de cette question."
|
||||
},
|
||||
"example": "Choose a password"
|
||||
},
|
||||
{
|
||||
|
|
|
@ -159,6 +159,11 @@ name: ${db_name}\nuser: ${db_name}\npass: ${db_pwd}" > ../sources/db_access.txt
|
|||
cp -r "../sources/db_access.txt" "$final_path/db_access.txt"
|
||||
fi
|
||||
|
||||
#=================================================
|
||||
# APPLY RIGHTS
|
||||
#=================================================
|
||||
ynh_script_progression --message="Apply rights..."
|
||||
|
||||
chown -R $app:www-data "$final_path"
|
||||
|
||||
# Home directory of the user needs to be owned by root to allow
|
||||
|
@ -176,8 +181,6 @@ ynh_script_progression --message="Adding a configuration file..."
|
|||
|
||||
ynh_add_config --template="../conf/server.toml" --destination="/etc/gemserv/config.d/$domain.toml"
|
||||
|
||||
chown gemserv:gemserv "/etc/gemserv/config.d/$domain.toml"
|
||||
|
||||
ynh_systemd_action --service_name=gemserv --action=reload
|
||||
|
||||
#=================================================
|
||||
|
|
|
@ -80,16 +80,6 @@ ynh_script_progression --message="Restoring the app main directory..."
|
|||
|
||||
ynh_restore_file --origin_path="$final_path"
|
||||
|
||||
# Restore permissions on app files
|
||||
chown -R $app:www-data "$final_path"
|
||||
# Home directory of the user needs to be owned by root to allow
|
||||
# SFTP connections
|
||||
chown root:root "$final_path"
|
||||
setfacl -m g:$app:r-x "$final_path"
|
||||
setfacl -m g:www-data:r-x "$final_path"
|
||||
setfacl -m g:gemserv:r-x "$final_path"
|
||||
chmod o-rwx "$final_path"
|
||||
|
||||
#=================================================
|
||||
# RESTORE THE PHP-FPM CONFIGURATION
|
||||
#=================================================
|
||||
|
@ -135,6 +125,21 @@ ynh_restore_file --origin_path="/etc/gemserv/config.d/$domain.toml"
|
|||
|
||||
ynh_systemd_action --service_name=gemserv --action=reload
|
||||
|
||||
#=================================================
|
||||
# APPLY RIGHTS
|
||||
#=================================================
|
||||
ynh_script_progression --message="Apply rights..."
|
||||
|
||||
chown -R $app:www-data "$final_path"
|
||||
|
||||
# Home directory of the user needs to be owned by root to allow
|
||||
# SFTP connections
|
||||
chown root:root "$final_path"
|
||||
setfacl -m g:$app:r-x "$final_path"
|
||||
setfacl -m g:www-data:r-x "$final_path"
|
||||
setfacl -m g:gemserv:r-x "$final_path"
|
||||
chmod o-rwx "$final_path"
|
||||
|
||||
#=================================================
|
||||
# GENERIC FINALIZATION
|
||||
#=================================================
|
||||
|
|
|
@ -90,16 +90,6 @@ then
|
|||
ynh_setup_source --dest_dir="$final_path/www/htmgem"
|
||||
fi
|
||||
|
||||
chown -R $app:www-data "$final_path"
|
||||
|
||||
# Home directory of the user needs to be owned by root to allow
|
||||
# SFTP connections
|
||||
chown root:root "$final_path"
|
||||
setfacl -m g:$app:r-x "$final_path"
|
||||
setfacl -m g:www-data:r-x "$final_path"
|
||||
setfacl -m g:gemserv:r-x "$final_path"
|
||||
chmod o-rwx "$final_path"
|
||||
|
||||
#=================================================
|
||||
# NGINX CONFIGURATION
|
||||
#=================================================
|
||||
|
@ -126,8 +116,19 @@ ynh_add_fpm_config
|
|||
#=================================================
|
||||
# SPECIFIC UPGRADE
|
||||
#=================================================
|
||||
# ...
|
||||
# APPLY RIGHTS
|
||||
#=================================================
|
||||
ynh_script_progression --message="Apply rights..."
|
||||
|
||||
chown -R $app:www-data "$final_path"
|
||||
|
||||
# Home directory of the user needs to be owned by root to allow
|
||||
# SFTP connections
|
||||
chown root:root "$final_path"
|
||||
setfacl -m g:$app:r-x "$final_path"
|
||||
setfacl -m g:www-data:r-x "$final_path"
|
||||
setfacl -m g:gemserv:r-x "$final_path"
|
||||
chmod o-rwx "$final_path"
|
||||
|
||||
#=================================================
|
||||
# UPDATE A CONFIG FILE
|
||||
|
@ -136,8 +137,6 @@ ynh_script_progression --message="Updating a configuration file..."
|
|||
|
||||
ynh_add_config --template="../conf/server.toml" --destination="/etc/gemserv/config.d/$domain.toml"
|
||||
|
||||
chown gemserv:gemserv "/etc/gemserv/config.d/$domain.toml"
|
||||
|
||||
ynh_systemd_action --service_name=gemserv --action=reload
|
||||
|
||||
#=================================================
|
||||
|
|
Loading…
Add table
Reference in a new issue