mirror of
https://github.com/YunoHost-Apps/shiori_ynh.git
synced 2024-09-03 20:26:17 +02:00
install on subpath
This commit is contained in:
parent
aa7e85055c
commit
b16ce1d17a
6 changed files with 18 additions and 6 deletions
|
@ -1,11 +1,11 @@
|
||||||
;; Test complet
|
;; Test complet
|
||||||
; Manifest
|
; Manifest
|
||||||
domain="domain.tld"
|
domain="domain.tld"
|
||||||
path="/"
|
path="/path"
|
||||||
is_public=1
|
is_public=1
|
||||||
; Checks
|
; Checks
|
||||||
pkg_linter=1
|
pkg_linter=1
|
||||||
setup_sub_dir=0
|
setup_sub_dir=1
|
||||||
setup_root=1
|
setup_root=1
|
||||||
setup_nourl=0
|
setup_nourl=0
|
||||||
setup_private=1
|
setup_private=1
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
location / {
|
location __PATH__/ {
|
||||||
|
|
||||||
proxy_pass http://127.0.0.1:__PORT__;
|
proxy_pass http://127.0.0.1:__PORT__;
|
||||||
proxy_redirect off;
|
proxy_redirect off;
|
||||||
|
|
|
@ -8,7 +8,7 @@ Type=simple
|
||||||
User=__APP__
|
User=__APP__
|
||||||
Group=__APP__
|
Group=__APP__
|
||||||
WorkingDirectory=__FINALPATH__/
|
WorkingDirectory=__FINALPATH__/
|
||||||
ExecStart=__FINALPATH__/shiori serve --port __PORT__
|
ExecStart=__FINALPATH__/shiori serve --port __PORT__ --webroot __PATH__
|
||||||
Restart=always
|
Restart=always
|
||||||
Environment="SHIORI_DIR=__DATADIR__"
|
Environment="SHIORI_DIR=__DATADIR__"
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
"en": "Simple bookmark manager",
|
"en": "Simple bookmark manager",
|
||||||
"fr": "Gestionnaire de liens simple"
|
"fr": "Gestionnaire de liens simple"
|
||||||
},
|
},
|
||||||
"version": "1.5.2~ynh1",
|
"version": "1.5.2~ynh2",
|
||||||
"url": "https://github.com/go-shiori/shiori",
|
"url": "https://github.com/go-shiori/shiori",
|
||||||
"upstream": {
|
"upstream": {
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
|
@ -34,6 +34,12 @@
|
||||||
"name": "domain",
|
"name": "domain",
|
||||||
"type": "domain"
|
"type": "domain"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "path",
|
||||||
|
"type": "path",
|
||||||
|
"example": "/example",
|
||||||
|
"default": "/example"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "is_public",
|
"name": "is_public",
|
||||||
"type": "boolean",
|
"type": "boolean",
|
||||||
|
|
|
@ -78,6 +78,7 @@ ynh_systemd_action --service_name=$app --action="stop" --log_path="systemd"
|
||||||
ynh_script_progression --message="Updating NGINX web server configuration..." --weight=1
|
ynh_script_progression --message="Updating NGINX web server configuration..." --weight=1
|
||||||
|
|
||||||
nginx_conf_path=/etc/nginx/conf.d/$old_domain.d/$app.conf
|
nginx_conf_path=/etc/nginx/conf.d/$old_domain.d/$app.conf
|
||||||
|
systemd_conf_path=/etc/systemd/system/$app.service
|
||||||
|
|
||||||
# Change the path in the NGINX config file
|
# Change the path in the NGINX config file
|
||||||
if [ $change_path -eq 1 ]
|
if [ $change_path -eq 1 ]
|
||||||
|
@ -89,6 +90,11 @@ then
|
||||||
path_url="$new_path"
|
path_url="$new_path"
|
||||||
# Create a dedicated NGINX config
|
# Create a dedicated NGINX config
|
||||||
ynh_add_nginx_config
|
ynh_add_nginx_config
|
||||||
|
|
||||||
|
# Make a backup of the original Systemd file if modified
|
||||||
|
ynh_backup_if_checksum_is_different --file="$systemd_conf_path"
|
||||||
|
|
||||||
|
datadir=$(ynh_app_setting_get --app=$app --key=datadir)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Change the domain for NGINX
|
# Change the domain for NGINX
|
||||||
|
|
|
@ -21,7 +21,7 @@ ynh_abort_if_errors
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
domain=$YNH_APP_ARG_DOMAIN
|
domain=$YNH_APP_ARG_DOMAIN
|
||||||
path_url="/"
|
path_url=$YNH_APP_ARG_PATH
|
||||||
is_public=$YNH_APP_ARG_IS_PUBLIC
|
is_public=$YNH_APP_ARG_IS_PUBLIC
|
||||||
architecture=$YNH_ARCH
|
architecture=$YNH_ARCH
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue