mirror of
https://github.com/YunoHost-Apps/z-push_ynh.git
synced 2024-09-03 18:05:58 +02:00
Store key parameters
This commit is contained in:
parent
634229731c
commit
f73a249aa8
1 changed files with 14 additions and 7 deletions
|
@ -55,7 +55,7 @@ CHECK_DOMAINPATH
|
||||||
# Prereqs
|
# Prereqs
|
||||||
sudo apt-get install php-soap php5-imap libawl-php php5-xsl -y
|
sudo apt-get install php-soap php5-imap libawl-php php5-xsl -y
|
||||||
|
|
||||||
final_path=/var/www/$app
|
final_path="/var/www/$app"
|
||||||
|
|
||||||
CHECK_FINALPATH () { # Vérifie que le dossier de destination n'est pas déjà utilisé.
|
CHECK_FINALPATH () { # Vérifie que le dossier de destination n'est pas déjà utilisé.
|
||||||
if [ -e "$final_path" ]
|
if [ -e "$final_path" ]
|
||||||
|
@ -68,11 +68,19 @@ CHECK_FINALPATH () { # Vérifie que le dossier de destination n'est pas déj
|
||||||
CHECK_FINALPATH
|
CHECK_FINALPATH
|
||||||
|
|
||||||
|
|
||||||
final_logpath=/var/log/$app
|
|
||||||
|
|
||||||
# Define variables and Save app settings
|
# Define variables and Save app settings
|
||||||
ynh_app_setting_set "$app" domain "$domain"
|
ynh_app_setting_set "$app" domain "$domain"
|
||||||
|
ynh_app_setting_set "$app" final_path "$final_path"
|
||||||
|
|
||||||
|
final_logpath="/var/log/$app"
|
||||||
|
ynh_app_setting_set "$app" final_logpath "$final_logpath"
|
||||||
|
|
||||||
|
final_nginxconf="/etc/nginx/conf.d/${domain}.d/${app}.conf"
|
||||||
|
ynh_app_setting_set "$app" final_nginxconf "$final_nginxconf"
|
||||||
|
|
||||||
|
final_phpconf="/etc/php5/fpm/pool.d/${app}.conf"
|
||||||
|
ynh_app_setting_set "$app" final_phpconf "$final_phpconf"
|
||||||
|
|
||||||
# Copy files to the right place
|
# Copy files to the right place
|
||||||
sudo mkdir -p $final_path
|
sudo mkdir -p $final_path
|
||||||
|
@ -133,14 +141,13 @@ sudo ln -s /usr/share/awl/inc/XML* /var/www/$app/include/
|
||||||
# Modify Nginx configuration file and copy it to Nginx conf directory
|
# Modify Nginx configuration file and copy it to Nginx conf directory
|
||||||
sudo sed -i "s@ALIASTOCHANGE@$final_path/@g" ../conf/nginx.conf
|
sudo sed -i "s@ALIASTOCHANGE@$final_path/@g" ../conf/nginx.conf
|
||||||
sudo sed -i "s@NAMETOCHANGE@$app@g" ../conf/nginx.conf
|
sudo sed -i "s@NAMETOCHANGE@$app@g" ../conf/nginx.conf
|
||||||
sudo cp ../conf/nginx.conf /etc/nginx/conf.d/$domain.d/$app.conf
|
sudo cp ../conf/nginx.conf $final_nginxconf
|
||||||
|
|
||||||
# Dedicated php-fpm processes
|
# Dedicated php-fpm processes
|
||||||
sudo sed -i "s@NAMETOCHANGE@$app@g" ../conf/php-fpm.conf
|
sudo sed -i "s@NAMETOCHANGE@$app@g" ../conf/php-fpm.conf
|
||||||
finalphpconf=/etc/php5/fpm/pool.d/$app.conf
|
sudo cp ../conf/php-fpm.conf $final_phpconf
|
||||||
sudo cp ../conf/php-fpm.conf $finalphpconf
|
sudo chown root: $final_phpconf
|
||||||
sudo chown root: $finalphpconf
|
sudo chmod 644 $final_phpconf
|
||||||
sudo chmod 644 $finalphpconf
|
|
||||||
|
|
||||||
# Enable api for client and make app public
|
# Enable api for client and make app public
|
||||||
ynh_app_setting_set $app skipped_uris "/"
|
ynh_app_setting_set $app skipped_uris "/"
|
||||||
|
|
Loading…
Add table
Reference in a new issue