mirror of
https://github.com/YunoHost-Apps/gotify_ynh.git
synced 2024-09-03 20:36:26 +02:00
force install on domain root and as public
This commit is contained in:
parent
e0fbbb9a6d
commit
55e5b21330
2 changed files with 4 additions and 34 deletions
|
@ -3,8 +3,8 @@
|
||||||
"id": "gotify",
|
"id": "gotify",
|
||||||
"packaging_format": 1,
|
"packaging_format": 1,
|
||||||
"description": {
|
"description": {
|
||||||
"en": "Gotify package for YunoHost.",
|
"en": "A simple server for sending and receiving messages.",
|
||||||
"fr": "Package Gotify pour YunoHost."
|
"fr": "Un simple serveur pour envoyer et recevoir des messages."
|
||||||
},
|
},
|
||||||
"version": "1.2.1",
|
"version": "1.2.1",
|
||||||
"url": "http://gotify.net",
|
"url": "http://gotify.net",
|
||||||
|
@ -32,16 +32,6 @@
|
||||||
},
|
},
|
||||||
"example": "example.com"
|
"example": "example.com"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"name": "path",
|
|
||||||
"type": "path",
|
|
||||||
"ask": {
|
|
||||||
"en": "Choose a path for gotify",
|
|
||||||
"fr": "Choisissez un chemin pour gotify"
|
|
||||||
},
|
|
||||||
"example": "/gotify",
|
|
||||||
"default": "/gotify"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"name": "admin",
|
"name": "admin",
|
||||||
"type": "user",
|
"type": "user",
|
||||||
|
@ -51,15 +41,6 @@
|
||||||
},
|
},
|
||||||
"example": "johndoe"
|
"example": "johndoe"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"name": "is_public",
|
|
||||||
"type": "boolean",
|
|
||||||
"ask": {
|
|
||||||
"en": "Is it a public application?",
|
|
||||||
"fr": "Est-ce une application publique ?"
|
|
||||||
},
|
|
||||||
"default": true
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"name": "password",
|
"name": "password",
|
||||||
"type": "password",
|
"type": "password",
|
||||||
|
|
|
@ -26,9 +26,9 @@ ynh_abort_if_errors
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
domain=$YNH_APP_ARG_DOMAIN
|
domain=$YNH_APP_ARG_DOMAIN
|
||||||
path_url=$YNH_APP_ARG_PATH
|
path_url=/
|
||||||
admin=$YNH_APP_ARG_ADMIN
|
admin=$YNH_APP_ARG_ADMIN
|
||||||
is_public=$YNH_APP_ARG_IS_PUBLIC
|
is_public=1
|
||||||
password=$YNH_APP_ARG_PASSWORD
|
password=$YNH_APP_ARG_PASSWORD
|
||||||
|
|
||||||
### If it's a multi-instance app, meaning it can be installed several times independently
|
### If it's a multi-instance app, meaning it can be installed several times independently
|
||||||
|
@ -53,12 +53,6 @@ test ! -e "$final_path" || ynh_die "This path already contains a folder"
|
||||||
# Normalize the url path syntax
|
# Normalize the url path syntax
|
||||||
path_url=$(ynh_normalize_url_path $path_url)
|
path_url=$(ynh_normalize_url_path $path_url)
|
||||||
|
|
||||||
# Does not work in subpath
|
|
||||||
if [ "$path_url" != "/" ]
|
|
||||||
then
|
|
||||||
ynh_die "Cannot be installed in subpath"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Check web path availability
|
# Check web path availability
|
||||||
ynh_webpath_available $domain $path_url
|
ynh_webpath_available $domain $path_url
|
||||||
# Register (book) web path
|
# Register (book) web path
|
||||||
|
@ -127,11 +121,6 @@ ynh_setup_source "$final_path" $architecture
|
||||||
### `ynh_add_nginx_config` will use the file conf/nginx.conf
|
### `ynh_add_nginx_config` will use the file conf/nginx.conf
|
||||||
|
|
||||||
# Create a dedicated nginx config
|
# Create a dedicated nginx config
|
||||||
if [ "$path_url" != "/" ]
|
|
||||||
then
|
|
||||||
ynh_replace_string "^#sub_path_only" "" "../conf/nginx.conf"
|
|
||||||
fi
|
|
||||||
|
|
||||||
ynh_add_nginx_config
|
ynh_add_nginx_config
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
Loading…
Add table
Reference in a new issue