mirror of
https://github.com/YunoHost-Apps/jappix_ynh.git
synced 2024-09-03 19:26:19 +02:00
Fix linter
This commit is contained in:
parent
bf5482b195
commit
463b065e4a
1 changed files with 14 additions and 13 deletions
|
@ -13,7 +13,7 @@ source /usr/share/yunohost/helpers
|
||||||
# MANAGE FAILURE OF THE SCRIPT
|
# MANAGE FAILURE OF THE SCRIPT
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
ynh_check_error # Active trap pour arrêter le script si une erreur est détectée.
|
ynh_abort_if_errors
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# RETRIEVE ARGUMENTS FROM THE MANIFEST
|
# RETRIEVE ARGUMENTS FROM THE MANIFEST
|
||||||
|
@ -24,8 +24,8 @@ path=$YNH_APP_ARG_PATH
|
||||||
name=$YNH_APP_ARG_NAME
|
name=$YNH_APP_ARG_NAME
|
||||||
language=$YNH_APP_ARG_LANGUAGE
|
language=$YNH_APP_ARG_LANGUAGE
|
||||||
|
|
||||||
|
|
||||||
app=$YNH_APP_INSTANCE_NAME
|
app=$YNH_APP_INSTANCE_NAME
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# Check domain/path availability
|
# Check domain/path availability
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -49,22 +49,22 @@ ynh_app_setting_set $app final_path $final_path
|
||||||
|
|
||||||
SETUP_SOURCE # Télécharge la source, décompresse et copie dans $final_path
|
SETUP_SOURCE # Télécharge la source, décompresse et copie dans $final_path
|
||||||
|
|
||||||
sudo mkdir -p "${final_path}/store/conf"
|
mkdir -p "${final_path}/store/conf"
|
||||||
sudo cp ../conf/*.xml "${final_path}/store/conf/"
|
cp ../conf/*.xml "${final_path}/store/conf/"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# Set permissions to jappix directory
|
# Set permissions to jappix directory
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
sudo chown -R www-data: "$final_path"
|
chown -R www-data: "$final_path"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# Set and copy NGINX configuraion
|
# Set and copy NGINX configuraion
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
sudo sed -i "s@PATHTOCHANGE@${path}@g" ../conf/nginx.conf
|
sed -i "s@PATHTOCHANGE@${path}@g" ../conf/nginx.conf
|
||||||
sudo sed -i "s@ALIASTOCHANGE@${final_path}/@g" ../conf/nginx.conf
|
sed -i "s@ALIASTOCHANGE@${final_path}/@g" ../conf/nginx.conf
|
||||||
sudo cp ../conf/nginx.conf "/etc/nginx/conf.d/${domain}.d/${app}.conf"
|
cp ../conf/nginx.conf "/etc/nginx/conf.d/${domain}.d/${app}.conf"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# Validate language
|
# Validate language
|
||||||
|
@ -77,12 +77,13 @@ sudo cp ../conf/nginx.conf "/etc/nginx/conf.d/${domain}.d/${app}.conf"
|
||||||
# Set Jappix configuration
|
# Set Jappix configuration
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
sudo sed -i "s@PATHTOCHANGE@${path}@g" "${final_path}/store/conf/hosts.xml"
|
sed -i "s@PATHTOCHANGE@${path}@g" "${final_path}/store/conf/hosts.xml"
|
||||||
sudo sed -i "s@CHANGELANG@${language}@g" "${final_path}/store/conf/main.xml"
|
sed -i "s@CHANGELANG@${language}@g" "${final_path}/store/conf/main.xml"
|
||||||
sudo sed -i "s@CHANGENAME@${name}@g" "${final_path}/store/conf/main.xml"
|
sed -i "s@CHANGENAME@${name}@g" "${final_path}/store/conf/main.xml"
|
||||||
sudo sed -i "s@DOMAINTOCHANGE@${domain}@g" "${final_path}/store/conf/hosts.xml"
|
sed -i "s@DOMAINTOCHANGE@${domain}@g" "${final_path}/store/conf/hosts.xml"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# Reload services
|
# Reload services
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
sudo service nginx reload
|
ynh_systemd_action --service_name=nginx --action=reload
|
||||||
|
|
Loading…
Reference in a new issue