mirror of
https://github.com/YunoHost-Apps/kanboard_ynh.git
synced 2024-09-03 19:36:17 +02:00
Mode public
This commit is contained in:
parent
f1ee19f412
commit
2cfe386e3c
1 changed files with 13 additions and 1 deletions
|
@ -7,6 +7,7 @@ app=kanboard
|
|||
domain=$1
|
||||
path=$2
|
||||
admin=$3
|
||||
is_public=$4
|
||||
|
||||
# Retrieve admin email
|
||||
email=$(sudo yunohost user info $admin | grep mail: | sed "s/mail: //g")
|
||||
|
@ -22,6 +23,7 @@ db_pwd=$(openssl rand -hex 15)
|
|||
sudo yunohost app initdb $app -p $db_pwd
|
||||
sudo yunohost app setting $app mysqlpwd -v $db_pwd
|
||||
sudo yunohost app setting $app adminusername -v $admin
|
||||
sudo yunohost app setting $app is_public -v $is_public
|
||||
|
||||
# Copy sources
|
||||
final_path=/var/www/$app
|
||||
|
@ -53,7 +55,17 @@ sed -i "s@PATHTOCHANGE@$path@g" ../conf/nginx.conf*
|
|||
sed -i "s@ALIASTOCHANGE@$final_path/@g" ../conf/nginx.conf*
|
||||
sudo cp ../conf/nginx.conf /etc/nginx/conf.d/$domain.d/$app.conf
|
||||
|
||||
# Make app public or private
|
||||
if [ "$is_public" = "Yes" ];
|
||||
then
|
||||
sudo yunohost app setting $app unprotected_uris -v "/"
|
||||
sudo sed -i "s/define('LDAP_AUTH'.*$/define('LDAP_AUTH', true);/g" $final_path/config.php
|
||||
sudo sed -i "s/define('HIDE_LOGIN_FORM'.*$/define('HIDE_LOGIN_FORM', false);/g" $final_path/config.php
|
||||
sudo sed -i "s/define('REMEMBER_ME_AUTH'.*$/define('REMEMBER_ME_AUTH', true);/g" $final_path/config.php
|
||||
sudo sed -i "s/define('DISABLE_LOGOUT'.*$/define('DISABLE_LOGOUT', false);/g" $final_path/config.php
|
||||
fi
|
||||
|
||||
# Reload Nginx, PHP5-FPM and regenerate SSOwat conf
|
||||
sudo service php5-fpm restart
|
||||
sudo service nginx reload
|
||||
sudo yunohost app ssowatconf
|
||||
sudo yunohost app ssowatconf
|
||||
|
|
Loading…
Reference in a new issue