mirror of
https://github.com/YunoHost-Apps/onlyoffice_ynh.git
synced 2024-09-03 19:56:11 +02:00
fix
This commit is contained in:
parent
3839359d78
commit
5eb19f5b83
3 changed files with 63 additions and 58 deletions
|
@ -1,4 +1,4 @@
|
||||||
location ^~ __PATH__/ {
|
location / {
|
||||||
proxy_pass http://127.0.0.1:__PORT__;
|
proxy_pass http://127.0.0.1:__PORT__;
|
||||||
proxy_redirect off;
|
proxy_redirect off;
|
||||||
proxy_set_header Host $host;
|
proxy_set_header Host $host;
|
||||||
|
|
|
@ -1,49 +1,58 @@
|
||||||
{
|
{
|
||||||
"name": "OnlyOffice",
|
"name": "OnlyOffice",
|
||||||
"id": "onlyoffice",
|
"id": "onlyoffice",
|
||||||
"packaging_format": 1,
|
"packaging_format": 1,
|
||||||
"description": {
|
"description": {
|
||||||
"en": "OnlyOffice package for YunoHost.",
|
"en": "OnlyOffice package for YunoHost.",
|
||||||
"fr": "OnlyOffice pour YunoHost."
|
"fr": "OnlyOffice pour YunoHost."
|
||||||
},
|
|
||||||
"url": "https://",
|
|
||||||
"license": "free",
|
|
||||||
"maintainer": {
|
|
||||||
"name": "liberodark",
|
|
||||||
"email": "liberodark@gmail.com",
|
|
||||||
"url": "https://onlyoffice.com"
|
|
||||||
},
|
|
||||||
"requirements": {
|
|
||||||
"yunohost": ">= 2.7.2"
|
|
||||||
},
|
|
||||||
"multi_instance": false,
|
|
||||||
"services": [
|
|
||||||
"nginx",
|
|
||||||
"php5-fpm",
|
|
||||||
"mysql"
|
|
||||||
],
|
|
||||||
"arguments": {
|
|
||||||
"install": [{
|
|
||||||
"name": "domain",
|
|
||||||
"type": "domain",
|
|
||||||
"ask": {
|
|
||||||
"en": "Choose a domain name for onlyoffice",
|
|
||||||
"fr": "Choisissez un nom de domaine pour onlyoffice"
|
|
||||||
},
|
|
||||||
"example": "example.com"
|
|
||||||
},
|
},
|
||||||
|
"version": "3.5.2",
|
||||||
|
"url": "https://www.onlyoffice.com/",
|
||||||
|
"license": "free",
|
||||||
|
"maintainer": {
|
||||||
|
"name": "liberodark",
|
||||||
|
"email": "liberodark@gmail.com"
|
||||||
|
},
|
||||||
|
"requirements": {
|
||||||
|
"yunohost": ">= 2.7.2"
|
||||||
|
},
|
||||||
|
"multi_instance": true,
|
||||||
|
"services": [
|
||||||
|
"nginx",
|
||||||
|
"php5-fpm",
|
||||||
|
"mysql"
|
||||||
|
],
|
||||||
|
"arguments": {
|
||||||
|
"install": [{
|
||||||
|
"name": "domain",
|
||||||
|
"type": "domain",
|
||||||
|
"ask": {
|
||||||
|
"en": "Choose a domain name for OnlyOffice",
|
||||||
|
"fr": "Choisissez un nom de domaine pour OnlyOffice"
|
||||||
|
},
|
||||||
|
"example": "example.com"
|
||||||
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
"name": "path",
|
"name": "path",
|
||||||
"type": "path",
|
"type": "path",
|
||||||
"ask": {
|
"ask": {
|
||||||
"en": "Choose a path for OnlyOffice",
|
"en": "Choose a path for OnlyOffice /onlyoffice is accepted",
|
||||||
"fr": "Choisissez un chemin pour OnlyOffice"
|
"fr": "Choisissez un chemin pour OnlyOffice /onlyoffice est accepté"
|
||||||
},
|
},
|
||||||
"example": "/onlyoffice",
|
"example": "/onlyoffice",
|
||||||
"default": "/onlyoffice"
|
"default": "/onlyoffice"
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
"name": "is_public",
|
||||||
|
"type": "boolean",
|
||||||
|
"ask": {
|
||||||
|
"en": "Is it a public site ?",
|
||||||
|
"fr": "Est-ce un site public ?"
|
||||||
|
},
|
||||||
|
"default": "true"
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
}
|
|
@ -6,7 +6,7 @@
|
||||||
# IMPORT GENERIC HELPERS
|
# IMPORT GENERIC HELPERS
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
#source _common.sh
|
source _common.sh
|
||||||
source /usr/share/yunohost/helpers
|
source /usr/share/yunohost/helpers
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -26,8 +26,8 @@ ynh_abort_if_errors
|
||||||
|
|
||||||
# Retrieve arguments
|
# Retrieve arguments
|
||||||
domain=$YNH_APP_ARG_DOMAIN
|
domain=$YNH_APP_ARG_DOMAIN
|
||||||
path_url=$YNH_APP_ARG_PATH
|
#path_url=$YNH_APP_ARG_PATH
|
||||||
is_public=$YNH_APP_ARG_IS_PUBLIC
|
#port=$YNH_APP_ARG_PORT
|
||||||
|
|
||||||
### 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
|
||||||
### The id of the app as stated in the manifest is available as $YNH_APP_ID
|
### The id of the app as stated in the manifest is available as $YNH_APP_ID
|
||||||
|
@ -51,20 +51,19 @@ final_path=/opt/yunohost/$app
|
||||||
test ! -e "$final_path" || ynh_die "This path already contains a folder"
|
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 /)
|
||||||
|
|
||||||
# Check web path availability
|
# Check web path availability
|
||||||
ynh_webpath_available $domain $path_url
|
ynh_webpath_available $domain /
|
||||||
# Register (book) web path
|
# Register (book) web path
|
||||||
ynh_webpath_register $app $domain $path_url
|
ynh_webpath_register $app $domain /
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# STORE SETTINGS FROM MANIFEST
|
# STORE SETTINGS FROM MANIFEST
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
ynh_app_setting_set $app domain $domain
|
ynh_app_setting_set $app domain $domain
|
||||||
ynh_app_setting_set $app path $path_url
|
#ynh_app_setting_set $app port $port
|
||||||
ynh_app_setting_set $app is_public $is_public
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# FIND AND OPEN A PORT
|
# FIND AND OPEN A PORT
|
||||||
|
@ -202,11 +201,8 @@ cp -a ../conf/default.json /etc/onlyoffice/documentserver/default.json
|
||||||
# SETUP SSOWAT
|
# SETUP SSOWAT
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
# If app is public, add url to SSOWat conf as skipped_uris
|
# unprotected_uris allows SSO credentials to be passed anyway.
|
||||||
if [ $is_public -eq 1 ]; then
|
ynh_app_setting_set $app unprotected_uris "/"
|
||||||
# unprotected_uris allows SSO credentials to be passed anyway.
|
|
||||||
ynh_app_setting_set "$app" unprotected_uris "/"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Reload services
|
# Reload services
|
||||||
systemctl restart nginx
|
systemctl restart nginx
|
||||||
|
|
Loading…
Add table
Reference in a new issue