mirror of
https://github.com/YunoHost-Apps/diaspora_ynh.git
synced 2024-09-03 18:26:13 +02:00
Remove the possibility to install in path, not supported upstream
from an irc conv on #diaspora: 17:38 <autra> hi! Can I run diaspora on a context_path, meaning on https://domain.tld/diaspora for instance? Or can I only do it on diaspora.domain.tld? 17:46 <jhass> unfortunately only the latter is really supported
This commit is contained in:
parent
fc428b360d
commit
16d1654d13
5 changed files with 10 additions and 25 deletions
|
@ -6,7 +6,7 @@
|
|||
admin_password="pass"
|
||||
; Checks
|
||||
pkg_linter=1
|
||||
setup_sub_dir=1
|
||||
setup_sub_dir=0 # not supported upstream
|
||||
setup_root=1
|
||||
setup_nourl=0
|
||||
setup_public=1
|
||||
|
|
|
@ -36,7 +36,7 @@ configuration: ## Section
|
|||
## However changing http to https is okay and has no consequences.
|
||||
## If you do change the URL, you will have to start again as the URL
|
||||
## will be hardcoded into the database.
|
||||
url: "https://{{ domain }}{{ path_url }}"
|
||||
url: "https://{{ domain }}"
|
||||
|
||||
## Set the bundle of certificate authorities (CA) certificates.
|
||||
## This is specific to your operating system.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# Proxy if requested file not found
|
||||
location __PATH__ {
|
||||
location / {
|
||||
|
||||
root __FINALPATH__/diaspora/public;
|
||||
|
||||
|
@ -11,7 +11,7 @@ location __PATH__ {
|
|||
# Proxy if requested file not found
|
||||
try_files $uri @diaspora;
|
||||
|
||||
location __PATH__/assets/ {
|
||||
location /assets/ {
|
||||
expires max;
|
||||
more_set_headers 'Cache-Control: public';
|
||||
}
|
||||
|
|
|
@ -27,21 +27,11 @@
|
|||
"name": "domain",
|
||||
"type": "domain",
|
||||
"ask": {
|
||||
"en": "Choose a domain for diaspora*",
|
||||
"fr": "Choisissez un domaine pour diaspora*"
|
||||
"en": "Choose a domain for diaspora* (it needs its own domain)",
|
||||
"fr": "Choisissez un domaine pour diaspora* (diaspora* a besoin de son propre domaine)"
|
||||
},
|
||||
"example": "domain.org"
|
||||
},
|
||||
{
|
||||
"name": "path",
|
||||
"type": "path",
|
||||
"ask": {
|
||||
"en": "Choose a path for ynhexample (only / is accepted for now)",
|
||||
"fr": "Choisissez un chemin pour diaspora (pour l'instant, uniquement / est accepté)"
|
||||
},
|
||||
"example": "/",
|
||||
"default": "/"
|
||||
},
|
||||
{
|
||||
"name": "admin",
|
||||
"type": "user",
|
||||
|
|
|
@ -28,7 +28,6 @@ ynh_abort_if_errors
|
|||
#=================================================
|
||||
|
||||
domain=$YNH_APP_ARG_DOMAIN
|
||||
path_url=$YNH_APP_ARG_PATH
|
||||
admin=$YNH_APP_ARG_ADMIN
|
||||
admin_password=$YNH_APP_ARG_ADMIN_PASSWORD
|
||||
admin_email=$(ynh_user_get_info --username=$admin --key=mail)
|
||||
|
@ -49,25 +48,22 @@ app=$YNH_APP_INSTANCE_NAME
|
|||
#=================================================
|
||||
# CHECK IF THE APP CAN BE INSTALLED WITH THESE ARGS
|
||||
#=================================================
|
||||
ynh_script_progression --message="Validating installation parameters..." --time --weight=1
|
||||
|
||||
# Normalize the url path syntax
|
||||
path_url=$(ynh_normalize_url_path $path_url)
|
||||
ynh_script_progression --message="Validating installation parameters..." --weight=1
|
||||
|
||||
# Check web path availability
|
||||
ynh_webpath_available --domain=$domain --path_url=$path_url
|
||||
ynh_webpath_available --domain=$domain --path_url=/
|
||||
# check path availability
|
||||
final_path=/var/www/$app
|
||||
test ! -e "$final_path" || ynh_die "This path already contains a folder"
|
||||
# Register (book) web path
|
||||
ynh_webpath_register --app=$app --domain=$domain --path_url=$path_url
|
||||
ynh_webpath_register --app=$app --domain=$domain --path_url=/
|
||||
|
||||
#=================================================
|
||||
# STORE SETTINGS FROM MANIFEST
|
||||
#=================================================
|
||||
ynh_script_progression --message="Saving app settings..." --time --weight=1
|
||||
ynh_app_setting_set --app=$app --key=domain --value=$domain
|
||||
ynh_app_setting_set --app=$app --key=path --value=$path_url
|
||||
ynh_app_setting_set --app=$app --key=path --value=/
|
||||
ynh_app_setting_set --app=$app --key=final_path --value=$final_path
|
||||
|
||||
#=================================================
|
||||
|
@ -125,7 +121,6 @@ popd
|
|||
#=================================================
|
||||
export app
|
||||
export domain
|
||||
export path_url
|
||||
export db_pass
|
||||
export final_path
|
||||
export admin
|
||||
|
|
Loading…
Add table
Reference in a new issue