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

[enh] scripts: small fixes.

- ssowatconf is no more necessary at the end of the install script.
This commit is contained in:
Moul 2016-06-14 12:55:55 +02:00
parent 4eeef49340
commit 7c6e3b79ec
2 changed files with 7 additions and 14 deletions

View file

@ -22,8 +22,7 @@ fi
# Check user
sudo yunohost user list --json | grep -q "\"username\": \"$admin\""
if [[ ! $? -eq 0 ]]; then
echo "Wrong user"
exit 1
echo "Wrong user" && exit 1
fi
# Save app settings
@ -60,7 +59,7 @@ sudo cp ../conf/nginx.conf /etc/nginx/conf.d/$domain.d/$app.conf
#temporary set public accessible
sudo yunohost app setting $app unprotected_uris -v "/"
# Restart services
# Reload services
sudo service nginx reload
sudo yunohost app ssowatconf
@ -92,8 +91,7 @@ sudo rm -f $final_path/install.php
sudo sed -i "/#pluxml_hosts/d" /etc/hosts
# If app is private, remove url to SSOWat conf from skipped_uris
if [ "$is_public" = "No" ];
then
if [ "$is_public" = "No" ]; then
sudo yunohost app setting $app unprotected_uris -d
fi
@ -101,8 +99,7 @@ fi
sudo yunohost app addaccess $app -u $admin
#allow only allowed users to access admin panel
sudo yunohost app setting pluxml protected_uris -v "/core/admin/"
sudo yunohost app setting $app protected_uris -v "/core/admin/"
# Restart services
# Reload nginx service
sudo service nginx reload
sudo yunohost app ssowatconf

View file

@ -8,7 +8,6 @@ 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%/}
@ -24,18 +23,15 @@ sudo chown -R www-data: $final_path/data
sudo find $final_path -type f | xargs sudo chmod 644
sudo find $final_path -type d | xargs sudo chmod 755
#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
if [ "$is_public" = "Yes" ]; then
sudo yunohost app setting $app unprotected_uris -v "/"
fi
# Restart services
# Reload nginx service
sudo service nginx reload
sudo yunohost app ssowatconf