mirror of
https://github.com/YunoHost-Apps/droppy_ynh.git
synced 2024-09-03 18:26:27 +02:00
Fix
This commit is contained in:
parent
1aec6071f5
commit
e8ab2bd94f
4 changed files with 12 additions and 10 deletions
|
@ -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=
|
||||
|
|
|
@ -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"
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue