mirror of
https://github.com/YunoHost-Apps/ethercalc_ynh.git
synced 2024-09-03 18:26:36 +02:00
Code refactoring
This commit is contained in:
parent
a9ba9dced9
commit
87fd0f6ad1
1 changed files with 7 additions and 17 deletions
|
@ -21,10 +21,10 @@ ynh_abort_if_errors
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
domain=$YNH_APP_ARG_DOMAIN
|
domain=$YNH_APP_ARG_DOMAIN
|
||||||
path_url=$YNH_APP_ARG_PATH
|
|
||||||
admin=$YNH_APP_ARG_ADMIN
|
admin=$YNH_APP_ARG_ADMIN
|
||||||
is_public=$YNH_APP_ARG_IS_PUBLIC
|
is_public=$YNH_APP_ARG_IS_PUBLIC
|
||||||
language=$YNH_APP_ARG_LANGUAGE
|
language=$YNH_APP_ARG_LANGUAGE
|
||||||
|
path_url="" # Assure la compatibilité avec les fonctions utilisant $path_url
|
||||||
|
|
||||||
# This is a multi-instance app, meaning it can be installed several times independently
|
# This is a multi-instance app, meaning it can be installed several times independently
|
||||||
# The id of the app as stated in the manifest is available as $YNH_APP_ID
|
# The id of the app as stated in the manifest is available as $YNH_APP_ID
|
||||||
|
@ -58,7 +58,6 @@ test ! -e "$final_path" || ynh_die "This path already contains a folder"
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
ynh_app_setting_set $app domain $domain
|
ynh_app_setting_set $app domain $domain
|
||||||
ynh_app_setting_set $app path $path_url
|
|
||||||
ynh_app_setting_set $app admin $admin
|
ynh_app_setting_set $app admin $admin
|
||||||
ynh_app_setting_set $app is_public $is_public
|
ynh_app_setting_set $app is_public $is_public
|
||||||
ynh_app_setting_set $app language $language
|
ynh_app_setting_set $app language $language
|
||||||
|
@ -129,7 +128,7 @@ ynh_fpm_config
|
||||||
#=================================================
|
#=================================================
|
||||||
# SPECIFIC SETUP
|
# SPECIFIC SETUP
|
||||||
#=================================================
|
#=================================================
|
||||||
# ...
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -140,22 +139,13 @@ ynh_fpm_config
|
||||||
ynh_systemd_config
|
ynh_systemd_config
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# SETUP APPLICATION WITH CURL
|
# INSTALL ETHERCALC
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
# Set right permissions for curl install
|
# Installe les dépendances de ethercalc et procède à l'intallation.
|
||||||
sudo chown -R $app: $final_path
|
ynh_use_nodejs
|
||||||
|
sudo_path "$final_path/bin/installDeps.sh" > $install_log 2>&1
|
||||||
# Set the app as temporarily public for curl call
|
sudo_path npm install forever -g >> $install_log 2>&1
|
||||||
ynh_app_setting_set $app unprotected_uris "/"
|
|
||||||
# Reload SSOwat config
|
|
||||||
sudo yunohost app ssowatconf
|
|
||||||
|
|
||||||
# Reload Nginx
|
|
||||||
sudo systemctl reload nginx
|
|
||||||
|
|
||||||
# Installation with curl
|
|
||||||
ynh_local_curl "/INSTALL_PATH" "key1=value1" "key2=value2" "key3=value3"
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# STORE THE CHECKSUM OF THE CONFIG FILE
|
# STORE THE CHECKSUM OF THE CONFIG FILE
|
||||||
|
|
Loading…
Add table
Reference in a new issue