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

[enh] Add 'is_public' setting.

This commit is contained in:
opi 2014-08-18 18:41:14 +02:00
parent 810eb81d11
commit 45020dc94b
3 changed files with 25 additions and 0 deletions

View file

@ -29,6 +29,15 @@
},
"example": "/hextris",
"default": "/hextris"
},
{
"name": "is_public",
"ask": {
"en": "Is it a public site ?",
"fr": "Est-ce un site public ?"
},
"choices": ["Yes", "No"],
"default": "Yes"
}
]
}

View file

@ -3,6 +3,7 @@
# Retrieve arguments
domain=$1
path=$2
is_public=$3
# Check domain/path availability
sudo yunohost app checkurl $domain$path -a hextris
@ -10,6 +11,10 @@ if [[ ! $? -eq 0 ]]; then
exit 1
fi
# Save app settings
sudo yunohost app setting hextris is_public -v "$is_public"
# Copy files to the right place
final_path=/var/www/hextris
sudo mkdir -p $final_path
@ -26,6 +31,11 @@ sudo cp ../conf/nginx.conf $nginxconf
sudo chown root: $nginxconf
sudo chmod 600 $nginxconf
if [ "$is_public" = "Yes" ];
then
sudo yunohost app setting hextris skipped_uris -v "/"
fi
# Reload web server & sso
sudo service nginx reload
sudo yunohost app ssowatconf

View file

@ -3,6 +3,7 @@
# Retrieve settings
domain=$(sudo yunohost app setting hextris domain)
path=$(sudo yunohost app setting hextris path)
is_public=$(sudo yunohost app setting hextris is_public)
# Remove trailing "/" for next commands
path=${path%/}
@ -23,6 +24,11 @@ sudo cp ../conf/nginx.conf $nginxconf
sudo chown root: $nginxconf
sudo chmod 600 $nginxconf
if [ "$is_public" = "Yes" ];
then
sudo yunohost app setting hextris skipped_uris -v "/"
fi
# Reload web server & sso
sudo service nginx reload
sudo yunohost app ssowatconf