mirror of
https://github.com/YunoHost/test_apps.git
synced 2024-09-03 20:06:29 +02:00
Make the legacy app installable as private
This commit is contained in:
parent
4a46e66320
commit
14b48e90f2
2 changed files with 10 additions and 1 deletions
|
@ -30,6 +30,14 @@
|
||||||
},
|
},
|
||||||
"example": "/legacy",
|
"example": "/legacy",
|
||||||
"default": "/legacy"
|
"default": "/legacy"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "is_public",
|
||||||
|
"type": "boolean",
|
||||||
|
"ask": {
|
||||||
|
"en": "Is it a public application?"
|
||||||
|
},
|
||||||
|
"default": true
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,6 +5,7 @@ app=$YNH_APP_INSTANCE_NAME
|
||||||
number=$YNH_APP_INSTANCE_NUMBER
|
number=$YNH_APP_INSTANCE_NUMBER
|
||||||
domain=$YNH_APP_ARG_DOMAIN
|
domain=$YNH_APP_ARG_DOMAIN
|
||||||
path=$YNH_APP_ARG_PATH
|
path=$YNH_APP_ARG_PATH
|
||||||
|
is_public=$YNH_APP_ARG_IS_PUBLIC
|
||||||
|
|
||||||
# Check domain/path availability
|
# Check domain/path availability
|
||||||
sudo yunohost app checkurl $domain/$path -a $app
|
sudo yunohost app checkurl $domain/$path -a $app
|
||||||
|
@ -34,7 +35,7 @@ sudo yunohost app setting $app mysqlpwd -v $db_pwd
|
||||||
sudo cp ../sources/importantfile /etc/
|
sudo cp ../sources/importantfile /etc/
|
||||||
|
|
||||||
# Set the app as public
|
# Set the app as public
|
||||||
sudo yunohost app setting $app unprotected_uris -v "/"
|
[ $is_public -eq 0 ] || sudo yunohost app setting $app unprotected_uris -v "/"
|
||||||
|
|
||||||
# Reload Nginx and regenerate SSOwat conf
|
# Reload Nginx and regenerate SSOwat conf
|
||||||
sudo service nginx reload
|
sudo service nginx reload
|
||||||
|
|
Loading…
Reference in a new issue