1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/pluxml_ynh.git synced 2024-09-03 20:16:02 +02:00

renaming src folder to sources, adding upgrade script and changing skipped_uris mode by unprotected_uris mode

This commit is contained in:
Valois Mathieu 2014-11-13 12:48:10 +01:00
parent 244237313c
commit 5b95d1fa42
173 changed files with 37 additions and 2 deletions

View file

@ -25,13 +25,15 @@ fi
# Save app settings # Save app settings
sudo yunohost app setting $app admin -v "$admin" sudo yunohost app setting $app admin -v "$admin"
sudo yunohost app setting $app is_public -v "$is_public" sudo yunohost app setting $app is_public -v "$is_public"
sudo yunohost app setting $app domain -v "$domain"
sudo yunohost app setting $app path -v "$path"
#create path for copying #create path for copying
final_path=/var/www/$app final_path=/var/www/$app
sudo mkdir -p $final_path sudo mkdir -p $final_path
#copy files to final folder and set permissions #copy files to final folder and set permissions
sudo cp -R ../src/* $final_path/ sudo cp -R ../sources/* $final_path/
sudo chown www-data:www-data -R $final_path sudo chown www-data:www-data -R $final_path
sudo chmod 750 -R $final_path sudo chmod 750 -R $final_path
@ -43,7 +45,7 @@ sudo cp ../conf/nginx.conf /etc/nginx/conf.d/$domain.d/$app.conf
# If app is public, add url to SSOWat conf as skipped_uris # If app is public, add url to SSOWat conf as skipped_uris
if [ "$is_public" = "Yes" ]; if [ "$is_public" = "Yes" ];
then then
sudo yunohost app setting $app skipped_uris -v "/" sudo yunohost app setting $app unprotected_uris -v "/"
fi fi
#adding admin to the allowed users #adding admin to the allowed users

33
scripts/upgrade Normal file
View file

@ -0,0 +1,33 @@
#! /bin/bash
app=pluxml
#retrieve arguments
domain=$(sudo yunohost app setting $app domain)
path=$(sudo yunohost app setting $app path)
admin=$(sudo yunohost app setting $app admin)
is_public=$(sudo yunohost app setting $app is_public)
# Remove trailing "/" for next commands
path=${path%/}
# Copy source files
final_path=/var/www/$app
sudo mkdir -p $final_path
sudo cp -a ../sources/* $final_path
#configure nginx settings
sudo sed -i "s@YNH_EXAMPLE_PATH@$path@g" ../conf/nginx.conf
sudo sed -i "s@YNH_EXAMPLE_ALIAS@$final_path@g" ../conf/nginx.conf
sudo cp ../conf/nginx.conf /etc/nginx/conf.d/$domain.d/$app.conf
# If app is public, add url to SSOWat conf as skipped_uris
if [ "$is_public" = "Yes" ];
then
sudo yunohost app setting $app unprotected_uris -v "/"
fi
# Restart services
sudo service nginx reload
sudo yunohost app ssowatconf

View file

Before

Width:  |  Height:  |  Size: 626 B

After

Width:  |  Height:  |  Size: 626 B

View file

Before

Width:  |  Height:  |  Size: 226 B

After

Width:  |  Height:  |  Size: 226 B

View file

Before

Width:  |  Height:  |  Size: 689 B

After

Width:  |  Height:  |  Size: 689 B

View file

Before

Width:  |  Height:  |  Size: 643 B

After

Width:  |  Height:  |  Size: 643 B

View file

Before

Width:  |  Height:  |  Size: 202 B

After

Width:  |  Height:  |  Size: 202 B

View file

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 3.1 KiB

View file

Before

Width:  |  Height:  |  Size: 115 B

After

Width:  |  Height:  |  Size: 115 B

View file

Before

Width:  |  Height:  |  Size: 6.1 KiB

After

Width:  |  Height:  |  Size: 6.1 KiB

Some files were not shown because too many files have changed in this diff Show more