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

Improves path check

This commit is contained in:
Selamanse 2017-07-19 17:07:36 +02:00
parent 1995a68faf
commit 19c910fb36

View file

@ -38,7 +38,13 @@ if [[ ! $? -eq 0 ]]; then
ynh_die "domain not available"
fi
final_path="/var/www/$app"
[[ -d $final_path ]] && ynh_die \
"The destination directory '$final_path' already exists.\
You should safely delete it before installing this app."
# Save specific settings
ynh_app_setting_set $app final_path $final_path
ynh_app_setting_set $app is_public $is_public
#Install dependencies
@ -58,12 +64,6 @@ sudo n $NODE_VERSION
port=$(ynh_find_port 3000)
# Create destination
final_path="/var/www/$app"
[[ -d $final_path ]] && ynh_die \
"The destination directory '$final_path' already exists.\
You should safely delete it before installing this app."
ynh_app_setting_set $app final_path $final_path
sudo mkdir -p $final_path
# Copy and set systemd configuration