mirror of
https://github.com/YunoHost-Apps/garradin_ynh.git
synced 2024-09-03 18:36:17 +02:00
Update restore
This commit is contained in:
parent
9ae5cfbe57
commit
c4f40e683d
1 changed files with 5 additions and 9 deletions
|
@ -26,25 +26,21 @@ domain=$(sudo ynh_app_setting_set $app domain)
|
||||||
path=$(sudo ynh_app_setting_set $app path)
|
path=$(sudo ynh_app_setting_set $app path)
|
||||||
user=$(sudo ynh_app_setting_set $app allowed_users)
|
user=$(sudo ynh_app_setting_set $app allowed_users)
|
||||||
is_public=$(sudo ynh_app_setting_set $app is_public)
|
is_public=$(sudo ynh_app_setting_set $app is_public)
|
||||||
|
final_path=/var/www/$app
|
||||||
|
|
||||||
# Check domain/path availability
|
# Check domain/path availability
|
||||||
sudo yunohost app checkurl $domain$path -a $app
|
sudo yunohost app checkurl "${domain}${path}" -a "$app" \
|
||||||
if [[ ! $? -eq 0 ]]; then
|
|| ynh_die "Path not available: ${domain}${path}"
|
||||||
echo "There is already an app on this URL : $domain$path" | sudo tee /dev/stderr
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
final_path=/var/www/$app
|
|
||||||
|
|
||||||
if [ -d $final_path ]; then
|
if [ -d $final_path ]; then
|
||||||
echo "There is already a directory: $final_path " | sudo tee /dev/stderr
|
echo "There is already a directory: $final_path " | sudo tee /dev/stderr
|
||||||
exit 1
|
ynh_die
|
||||||
fi
|
fi
|
||||||
|
|
||||||
conf=/etc/nginx/conf.d/$domain.d/$app.conf
|
conf=/etc/nginx/conf.d/$domain.d/$app.conf
|
||||||
if [ -f $conf ]; then
|
if [ -f $conf ]; then
|
||||||
echo "There is already a nginx conf file at this path: $conf " | sudo tee /dev/stderr
|
echo "There is already a nginx conf file at this path: $conf " | sudo tee /dev/stderr
|
||||||
exit 1
|
ynh_die
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Restore sources & data
|
# Restore sources & data
|
||||||
|
|
Loading…
Reference in a new issue