1
0
Fork 0
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:
Selamanse 2017-10-31 22:29:52 +01:00
parent 5bf7d2bcd8
commit e5d2928275
2 changed files with 11 additions and 2 deletions

View file

@ -35,11 +35,14 @@ workdir=$(pwd)
port=$(ynh_find_port 3000)
# Check domain/path availability
sudo yunohost app checkurl $domain -a $app
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
final_path="/var/lib/$app"
[[ -d $final_path ]] && ynh_die \
"The destination directory '$final_path' already exists.\

View file

@ -34,7 +34,13 @@ serviceuser=$(ynh_app_setting_get $app serviceuser)
port=$(ynh_app_setting_get $app port)
# 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
[[ -d $final_path ]] && ynh_die \