2017-09-03 01:55:45 +02:00
|
|
|
#!/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)
|
|
|
|
|
|
|
|
test ! -d /var/www/$app \
|
|
|
|
|| ynh_die "There is already a directory: /var/www/$app "
|
|
|
|
|
2017-09-03 23:11:33 +02:00
|
|
|
path=$(ynh_normalize_url_path $path)
|
2017-09-06 22:40:28 +02:00
|
|
|
#ynh_webpath_available $domain $path
|
|
|
|
#ynh_webpath_register $app $domain $path
|
2017-09-03 23:11:33 +02:00
|
|
|
|
2017-09-03 01:55:45 +02:00
|
|
|
sudo cp -a ./sources "/var/www/$app"
|
|
|
|
|
|
|
|
cp -a ./conf/nginx.conf "/etc/nginx/conf.d/$domain.d/$app.conf"
|
|
|
|
|
|
|
|
sudo service nginx reload
|