1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/phpldapadmin_ynh.git synced 2024-09-03 19:56:45 +02:00
phpldapadmin_ynh/scripts/restore
2017-09-02 23:55:45 +00:00

22 lines
541 B
Bash
Executable file

#!/bin/bash
set -eu
. /usr/share/yunohost/helpers
app=$YNH_APP_INSTANCE_NAME
domain=$(ynh_app_setting_get "$app" domain)
path=$(ynh_app_setting_get "$app" path)
admin=$(ynh_app_setting_get "$app" admin)
yunohost app checkurl "${domain}${path}" -a "$app" \
|| ynh_die "Path not available: ${domain}${path}"
test ! -d /var/www/$app \
|| ynh_die "There is already a directory: /var/www/$app "
sudo cp -a ./sources "/var/www/$app"
cp -a ./conf/nginx.conf "/etc/nginx/conf.d/$domain.d/$app.conf"
sudo service nginx reload