1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/droppy_ynh.git synced 2024-09-03 18:26:27 +02:00
This commit is contained in:
ericgaspar 2021-11-05 23:14:21 +01:00
parent 1aec6071f5
commit e8ab2bd94f
No known key found for this signature in database
GPG key ID: 574F281483054D44
4 changed files with 12 additions and 10 deletions

View file

@ -1,9 +1,9 @@
;; Test complet
; Manifest
domain="domain.tld" (DOMAIN)
path="/path" (PATH)
admin="john" (USER)
is_public=1 (PUBLIC|public=1|private=0)
domain="domain.tld"
path="/path"
admin="john"
is_public=1
; Checks
pkg_linter=1
setup_sub_dir=1
@ -15,7 +15,6 @@
#upgrade=1 from_commit=CommitHash
backup_restore=1
multi_instance=0
port_already_use=0
change_url=1
;;; Options
Email=

View file

@ -119,8 +119,6 @@ ynh_app_setting_set --app=$app --key=data_path --value=$data_path
# Create datadir folder
mkdir -p $data_path
# Create config folder
mkdir -p $final_path/config
# Give permission to the datadir
chmod 750 "$data_path"
@ -132,7 +130,7 @@ chown -R $app:www-data "$data_path"
#=================================================
ynh_script_progression --message="Configuring a systemd service..." --weight=1
ynh_replace_string --match_string="__ENV_PATH__" --replace_string="$PATH" --target_file="../conf/systemd.service"
ynh_replace_string --match_string="__ENV_PATH__" --replace_string="$PATH" --target_file="../conf/systemd.service"
ynh_add_systemd_config
@ -141,7 +139,11 @@ ynh_add_systemd_config
#=================================================
ynh_script_progression --message="Modifying a config file..." --weight=1
# Create config folder
mkdir -p $final_path/config
ynh_add_config --template="../conf/config.json.example" --destination="$final_path/config/config.json"
chmod 600 "$final_path/config/config.json"
chown $app:$app "$final_path/config/config.json"

View file

@ -64,7 +64,7 @@ ynh_secure_remove --file="$final_path"
if [ "${YNH_APP_PURGE:-0}" -eq 1 ]
then
ynh_script_progression --message="Removing app data directory..." --weight=1
ynh_secure_remove --file="$datadir"
ynh_secure_remove --file="$data_path"
fi
#=================================================
# REMOVE NGINX CONFIGURATION

View file

@ -127,6 +127,7 @@ fi
ynh_script_progression --message="Modifying a config file..." --weight=2
ynh_add_config --template="../conf/config.json.example" --destination="$final_path/config/config.json"
chmod 600 "$final_path/config/config.json"
chown $app:$app "$final_path/config/config.json"
@ -135,7 +136,7 @@ chown $app:$app "$final_path/config/config.json"
#=================================================
ynh_script_progression --message="Configuring a systemd service..." --weight=2
ynh_replace_string --match_string="__ENV_PATH__" --replace_string="$PATH" --target_file="../conf/systemd.service"
ynh_replace_string --match_string="__ENV_PATH__" --replace_string="$PATH" --target_file="../conf/systemd.service"
# Create a dedicated systemd config
ynh_add_systemd_config