mirror of
https://github.com/YunoHost-Apps/wekan_ynh.git
synced 2024-09-03 20:36:09 +02:00
[fix] Bad ROOT_URL
This commit is contained in:
parent
0a1d744f61
commit
7fda3a0a9f
4 changed files with 9 additions and 6 deletions
|
@ -11,7 +11,7 @@ ExecStartPre=__NODEJS__
|
||||||
Environment="PATH=__ENV_PATH__"
|
Environment="PATH=__ENV_PATH__"
|
||||||
Environment=NODE_ENV=production
|
Environment=NODE_ENV=production
|
||||||
Environment=MONGO_URL=mongodb://127.0.0.1:27017/__DB_NAME__
|
Environment=MONGO_URL=mongodb://127.0.0.1:27017/__DB_NAME__
|
||||||
Environment=ROOT_URL=http://127.0.0.1:__PORT____URI__ PORT=__PORT__
|
Environment=ROOT_URL=https://__DOMAIN__:__PORT____URI__ PORT=__PORT__
|
||||||
WorkingDirectory=__FINALPATH__
|
WorkingDirectory=__FINALPATH__
|
||||||
ExecStart=/opt/node_n/bin/node __FINALPATH__/main.js
|
ExecStart=/opt/node_n/bin/node __FINALPATH__/main.js
|
||||||
Restart=on-failure
|
Restart=on-failure
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
"name": "Wekan",
|
"name": "Wekan",
|
||||||
"id": "wekan",
|
"id": "wekan",
|
||||||
"packaging_format": 1,
|
"packaging_format": 1,
|
||||||
"version": "0.45-1",
|
"version": "0.45-2",
|
||||||
"description": {
|
"description": {
|
||||||
"en": "Trello-like kanban",
|
"en": "Trello-like kanban",
|
||||||
"fr": "Un kanban similaire à Trello"
|
"fr": "Un kanban similaire à Trello"
|
||||||
|
|
|
@ -101,6 +101,7 @@ ynh_replace_string "__ENV_PATH__" "$PATH" "../conf/systemd.service"
|
||||||
ynh_replace_string "__DB_NAME__" "$app" "../conf/systemd.service"
|
ynh_replace_string "__DB_NAME__" "$app" "../conf/systemd.service"
|
||||||
ynh_replace_string "__URI__" "$path_url" "../conf/systemd.service"
|
ynh_replace_string "__URI__" "$path_url" "../conf/systemd.service"
|
||||||
ynh_replace_string "__PORT__" "$port" "../conf/systemd.service"
|
ynh_replace_string "__PORT__" "$port" "../conf/systemd.service"
|
||||||
|
ynh_replace_string "__DOMAIN__" "$domain" "../conf/systemd.service"
|
||||||
ynh_add_systemd_config
|
ynh_add_systemd_config
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -19,7 +19,7 @@ domain=$(ynh_app_setting_get $app domain)
|
||||||
path_url=$(ynh_app_setting_get $app path_url)
|
path_url=$(ynh_app_setting_get $app path_url)
|
||||||
is_public=$(ynh_app_setting_get $app is_public)
|
is_public=$(ynh_app_setting_get $app is_public)
|
||||||
final_path=$(ynh_app_setting_get $app final_path)
|
final_path=$(ynh_app_setting_get $app final_path)
|
||||||
port=$(ynh_app_setting_get $app final_path)
|
port=$(ynh_app_setting_get $app port)
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# Check version
|
# Check version
|
||||||
|
@ -40,9 +40,10 @@ ynh_abort_if_errors # Exit if an error occurs during the execution of the script
|
||||||
# ENSURE DOWNWARD COMPATIBILITY
|
# ENSURE DOWNWARD COMPATIBILITY
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
#if [ "${version}" = "20160501-7" ]; then
|
if [ "${version}" = "0.45-1" ]; then
|
||||||
|
ynh_replace_string "Environment=ROOT_URL=http://127.0.0.1:$port$path_url" "Environment=ROOT_URL=https://$domain$path_url/" "/etc/systemd/system/$app.service"
|
||||||
#fi
|
systemctl daemon-reload
|
||||||
|
fi
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# STANDARD UPGRADE STEPS
|
# STANDARD UPGRADE STEPS
|
||||||
|
@ -67,4 +68,5 @@ find "$final_path" -type d -print0 | xargs -0 chmod 750
|
||||||
#=================================================
|
#=================================================
|
||||||
# RELOAD NGINX
|
# RELOAD NGINX
|
||||||
#=================================================
|
#=================================================
|
||||||
|
systemctl restart $app
|
||||||
systemctl reload nginx
|
systemctl reload nginx
|
||||||
|
|
Loading…
Reference in a new issue