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:
commit
9c25bc0ca3
2 changed files with 11 additions and 2 deletions
|
@ -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.\
|
||||
|
|
|
@ -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 \
|
||||
|
|
Loading…
Reference in a new issue