diff --git a/bin/vhost-user-jail-reset.sh b/bin/vhost-user-jail-reset.sh index f2a7889..b342e8b 100644 --- a/bin/vhost-user-jail-reset.sh +++ b/bin/vhost-user-jail-reset.sh @@ -36,7 +36,7 @@ if ! grep -q ":/usr/jails/$username/./home/$username:" /etc/passwd; then fi # check if any virtualhosts exist -if [ "$(ls -A /usr/jails/$username/var/www)" ]; then +if [ "$(ls -A /usr/jails/$username/srv/www)" ]; then # set virtualhosts array cd /usr/jails/$username/srv/www/ virtualhosts=(*) @@ -56,7 +56,7 @@ echo rm -r /usr/jails/$username # (re)create jail echo jk_init -k -j /usr/jails/$username shellstack -echo mkdir -p /usr/jails/$username/opt /usr/jails/$username/usr/sbin /usr/jails/$username/tmp /usr/jails/$username/var/www +echo mkdir -p /usr/jails/$username/opt /usr/jails/$username/usr/sbin /usr/jails/$username/tmp /usr/jails/$username/srv/www echo ln -s /usr/local/sbin/mini_sendmail /usr/jails/$username/usr/sbin/sendmail echo chmod a+rwx /usr/jails/$username/tmp echo install -d -o $username -g $username -m 755 /usr/jails/$username/home/$username diff --git a/bin/vhost-user-jail.sh b/bin/vhost-user-jail.sh index a6e9f4e..0e3f6df 100644 --- a/bin/vhost-user-jail.sh +++ b/bin/vhost-user-jail.sh @@ -36,7 +36,7 @@ if grep -q ":/usr/jails/$username/./home/$username:" /etc/passwd; then fi jk_init -k -j /usr/jails/$username shellstack -mkdir -p /usr/jails/$username/opt /usr/jails/$username/usr/sbin /usr/jails/$username/tmp /usr/jails/$username/var/www +mkdir -p /usr/jails/$username/opt /usr/jails/$username/usr/sbin /usr/jails/$username/tmp /usr/jails/$username/srv/www ln -s /usr/local/sbin/mini_sendmail /usr/jails/$username/usr/sbin/sendmail chmod a+rwx /usr/jails/$username/tmp install -d -o $username -g $username -m 755 /usr/jails/$username/home/$username diff --git a/bin/vhost-user-jails-sync.sh b/bin/vhost-user-jails-sync.sh index 5050db9..0ba0f10 100644 --- a/bin/vhost-user-jails-sync.sh +++ b/bin/vhost-user-jails-sync.sh @@ -46,6 +46,6 @@ for jail in "${jails[@]}" do for node in "${clusterNodes[@]}" do - rsync -$mode --archive --no-times --hard-links --exclude=/usr/jails/$jail/home --exclude=/usr/jails/$jail/var/www --relative --delete --rsh=/usr/bin/ssh /usr/jails/$jail root@$node.lan:/ + rsync -$mode --archive --no-times --hard-links --exclude=/usr/jails/$jail/home --exclude=/usr/jails/$jail/srv/www --relative --delete --rsh=/usr/bin/ssh /usr/jails/$jail root@$node.lan:/ done done