mirror of
https://github.com/YunoHost-Apps/syncserver-rs_ynh.git
synced 2024-09-03 20:26:32 +02:00
Don't require full domain.
This commit is contained in:
parent
05e6519ebc
commit
b9b9f45657
3 changed files with 8 additions and 3 deletions
|
@ -35,6 +35,11 @@ ram.runtime = "50M"
|
|||
# this is a generic question - ask strings are automatically handled by YunoHost's core
|
||||
type = "domain"
|
||||
|
||||
[install.path]
|
||||
# this is a generic question - ask strings are automatically handled by YunoHost's core
|
||||
type = "path"
|
||||
default = "/syncserver"
|
||||
|
||||
[resources]
|
||||
# See the packaging documentation for the full set
|
||||
# of explanation regarding the behavior and properties for each of those
|
||||
|
|
|
@ -28,10 +28,10 @@ ynh_change_url_nginx_config
|
|||
#=================================================
|
||||
# SPECIFIC MODIFICATIONS
|
||||
#=================================================
|
||||
# Retarget worker nodes
|
||||
# UPDATE NODE URL
|
||||
#=================================================
|
||||
|
||||
ynh_mysql_execute_as_root --sql="UPDATE nodes set node='https://$new_domain' WHERE node='https://$old_domain'" --database="$db_name_tokenserver";
|
||||
ynh_mysql_execute_as_root --sql="UPDATE nodes set node='https://$new_domain${new_path%%+(/)}' WHERE node='https://$old_domain${old_path%%+(/)}'" --database="$db_name_tokenserver";
|
||||
|
||||
#=================================================
|
||||
# GENERIC FINALISATION
|
||||
|
|
|
@ -81,7 +81,7 @@ ynh_exec_as $app python -m venv "${install_dir}/venv"
|
|||
|
||||
ynh_mysql_execute_as_root --sql="INSERT INTO services (id, service, pattern) VALUES (1, 'sync-1.5', '{node}/1.5/{uid}')" --database="$db_name_tokenserver";
|
||||
|
||||
ynh_exec_warn_less ynh_exec_as $app env PATH=$PATH SYNC_TOKENSERVER__DATABASE_URL="mysql://$db_user:${db_pwd}@localhost/$db_name_tokenserver" $install_dir/venv/bin/python tools/tokenserver/add_node.py "https://$domain$path_url" 10
|
||||
ynh_exec_warn_less ynh_exec_as $app env PATH=$PATH SYNC_TOKENSERVER__DATABASE_URL="mysql://$db_user:${db_pwd}@localhost/$db_name_tokenserver" $install_dir/venv/bin/python tools/tokenserver/add_node.py "https://$domain${path_url%%+(/)}" 10
|
||||
popd
|
||||
)
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue