mirror of
https://github.com/YunoHost-Apps/jappix_ynh.git
synced 2024-09-03 19:26:19 +02:00
Corrections install
- set -eu inutile, il est dans déjà ynh_check_error - final_path est défini dans CHECK_FINALPATH - path=${path:-/} inutile, il est corrigé CHECK_PATH - -e au lieu de -a - main.xml ne contient pas PATHTOCHANG et DOMAINTOCHANGE
This commit is contained in:
parent
183be381fc
commit
53d2c67e71
1 changed files with 2 additions and 9 deletions
|
@ -1,7 +1,5 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -eu
|
||||
|
||||
#=================================================
|
||||
# GENERIC STARTING
|
||||
#=================================================
|
||||
|
@ -43,13 +41,12 @@ CHECK_FINALPATH # Vérifie que le dossier de destination n'est pas déjà utilis
|
|||
ynh_app_setting_set $app name $name
|
||||
ynh_app_setting_set $app language $language
|
||||
ynh_app_setting_set $app domain $domain
|
||||
ynh_app_setting_set $app final_path $final_path
|
||||
|
||||
#=================================================
|
||||
# Copy files to the right place
|
||||
#=================================================
|
||||
|
||||
final_path="/var/www/${app}"
|
||||
ynh_app_setting_set $app final_path $final_path
|
||||
SETUP_SOURCE # Télécharge la source, décompresse et copie dans $final_path
|
||||
|
||||
sudo mkdir -p "${final_path}/store/conf"
|
||||
|
@ -65,8 +62,6 @@ sudo chown -R www-data: "$final_path"
|
|||
# Set and copy NGINX configuraion
|
||||
#=================================================
|
||||
|
||||
sudo sed -i "s@PATHTOCHANGE2@${path}@g" ../conf/nginx.conf
|
||||
path=${path:-/}
|
||||
sudo sed -i "s@PATHTOCHANGE@${path}@g" ../conf/nginx.conf
|
||||
sudo sed -i "s@ALIASTOCHANGE@${final_path}/@g" ../conf/nginx.conf
|
||||
sudo cp ../conf/nginx.conf "/etc/nginx/conf.d/${domain}.d/${app}.conf"
|
||||
|
@ -75,16 +70,14 @@ sudo cp ../conf/nginx.conf "/etc/nginx/conf.d/${domain}.d/${app}.conf"
|
|||
# Validate language
|
||||
#=================================================
|
||||
|
||||
[[ -a "${final_path}/i18n/${language}" ]] \
|
||||
[[ -e "${final_path}/i18n/${language}" ]] \
|
||||
|| language="en"
|
||||
|
||||
#=================================================
|
||||
# Set Jappix configuration
|
||||
#=================================================
|
||||
|
||||
sudo sed -i "s@PATHTOCHANGE@${path}@g" "${final_path}/store/conf/main.xml"
|
||||
sudo sed -i "s@PATHTOCHANGE@${path}@g" "${final_path}/store/conf/hosts.xml"
|
||||
sudo sed -i "s@DOMAINTOCHANGE@${domain}@g" "${final_path}/store/conf/main.xml"
|
||||
sudo 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"
|
||||
sudo sed -i "s@DOMAINTOCHANGE@${domain}@g" "${final_path}/store/conf/hosts.xml"
|
||||
|
|
Loading…
Add table
Reference in a new issue