mirror of
https://github.com/YunoHost-Apps/rocketchat_ynh.git
synced 2024-09-03 20:16:25 +02:00
Fixes bad, legacy usage of domain/path check
This commit is contained in:
parent
5bf7d2bcd8
commit
e5d2928275
2 changed files with 11 additions and 2 deletions
|
@ -35,11 +35,14 @@ workdir=$(pwd)
|
||||||
port=$(ynh_find_port 3000)
|
port=$(ynh_find_port 3000)
|
||||||
|
|
||||||
# Check domain/path availability
|
# Check domain/path availability
|
||||||
sudo yunohost app checkurl $domain -a $app
|
ynh_webpath_available $domain $path
|
||||||
if [[ ! $? -eq 0 ]]; then
|
if [[ ! $? -eq 0 ]]; then
|
||||||
ynh_die "domain not available"
|
ynh_die "domain not available"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Register/book a web path for an app
|
||||||
|
ynh_webpath_register $app $domain $path
|
||||||
|
|
||||||
final_path="/var/lib/$app"
|
final_path="/var/lib/$app"
|
||||||
[[ -d $final_path ]] && ynh_die \
|
[[ -d $final_path ]] && ynh_die \
|
||||||
"The destination directory '$final_path' already exists.\
|
"The destination directory '$final_path' already exists.\
|
||||||
|
|
|
@ -34,7 +34,13 @@ serviceuser=$(ynh_app_setting_get $app serviceuser)
|
||||||
port=$(ynh_app_setting_get $app port)
|
port=$(ynh_app_setting_get $app port)
|
||||||
|
|
||||||
# Check domain/path availability
|
# Check domain/path availability
|
||||||
sudo yunohost app checkurl "${domain}${path}" -a "$app" || ynh_die
|
ynh_webpath_available $domain $path
|
||||||
|
if [[ ! $? -eq 0 ]]; then
|
||||||
|
ynh_die "domain not available"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Register/book a web path for an app
|
||||||
|
ynh_webpath_register $app $domain $path
|
||||||
|
|
||||||
# Check destination directory
|
# Check destination directory
|
||||||
[[ -d $final_path ]] && ynh_die \
|
[[ -d $final_path ]] && ynh_die \
|
||||||
|
|
Loading…
Add table
Reference in a new issue