mirror of
https://github.com/YunoHost-Apps/baikal_ynh.git
synced 2024-09-03 18:16:11 +02:00
quoting
This commit is contained in:
parent
a5263eb0d8
commit
de51dfb9c2
3 changed files with 6 additions and 11 deletions
|
@ -15,6 +15,9 @@ timezone=$(cat /etc/timezone)
|
||||||
encrypt_key=$(ynh_string_random 24)
|
encrypt_key=$(ynh_string_random 24)
|
||||||
password_hash=$(echo -n admin:BaikalDAV:$password | sha256sum | cut -d ' ' -f 1)
|
password_hash=$(echo -n admin:BaikalDAV:$password | sha256sum | cut -d ' ' -f 1)
|
||||||
|
|
||||||
|
ynh_app_setting_set --app="$app" --key="encrypt_key" --value="$encrypt_key"
|
||||||
|
ynh_app_setting_set --app="$app" --key="password_hash" --value="$password_hash"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# CHECK IF THE APP CAN BE INSTALLED WITH THESE ARGS
|
# CHECK IF THE APP CAN BE INSTALLED WITH THESE ARGS
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -26,14 +29,6 @@ then
|
||||||
ynh_die --message="Another app already uses the domain $domain to serve a calDAV/cardDAV feature. Please use another domain."
|
ynh_die --message="Another app already uses the domain $domain to serve a calDAV/cardDAV feature. Please use another domain."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# STORE SETTINGS FROM MANIFEST
|
|
||||||
#=================================================
|
|
||||||
ynh_script_progression --message="Storing installation settings..." --weight=2
|
|
||||||
|
|
||||||
ynh_app_setting_set --app=$app --key=encrypt_key --value="$encrypt_key"
|
|
||||||
ynh_app_setting_set --app=$app --key=password_hash --value="$password_hash"
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -42,7 +37,7 @@ ynh_script_progression --message="Setting up source files..." --weight=8
|
||||||
ynh_setup_source --dest_dir="$install_dir"
|
ynh_setup_source --dest_dir="$install_dir"
|
||||||
|
|
||||||
chmod -R o-rwx "$install_dir"
|
chmod -R o-rwx "$install_dir"
|
||||||
chown -R $app:www-data "$install_dir"
|
chown -R "$app:www-data" "$install_dir"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# SYSTEM CONFIGURATION
|
# SYSTEM CONFIGURATION
|
||||||
|
|
|
@ -58,7 +58,7 @@ ynh_systemd_action --action=restart --service_name=fail2ban
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Reloading NGINX web server and $app's service..." --weight=1
|
ynh_script_progression --message="Reloading NGINX web server and $app's service..." --weight=1
|
||||||
|
|
||||||
ynh_systemd_action --service_name=php$phpversion-fpm --action=reload
|
ynh_systemd_action --service_name="php$phpversion-fpm" --action=reload
|
||||||
ynh_systemd_action --service_name=nginx --action=reload
|
ynh_systemd_action --service_name=nginx --action=reload
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -17,7 +17,7 @@ ynh_script_progression --message="Upgrading source files..." --weight=3
|
||||||
ynh_setup_source --dest_dir="$install_dir" --keep="config/baikal.yaml"
|
ynh_setup_source --dest_dir="$install_dir" --keep="config/baikal.yaml"
|
||||||
|
|
||||||
chmod -R o-rwx "$install_dir"
|
chmod -R o-rwx "$install_dir"
|
||||||
chown -R $app:www-data "$install_dir"
|
chown -R "$app:www-data" "$install_dir"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# REAPPLY SYSTEM CONFIGURATIONS
|
# REAPPLY SYSTEM CONFIGURATIONS
|
||||||
|
|
Loading…
Add table
Reference in a new issue