1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/rocketchat_ynh.git synced 2024-09-03 20:16:25 +02:00

Merge pull request #31 from selamanse/fix/baduseofcheckurl

Fixes bad/deprecated use of checkurl

Closes #27
This commit is contained in:
Felix Knecht 2017-11-02 09:49:18 +01:00 committed by GitHub
commit 9c25bc0ca3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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 \