/var/www -> /srv/www

This commit is contained in:
Matthew Saunders Brown 2021-04-15 10:01:11 -07:00
parent 5bce74f6fd
commit 397953ad7b
3 changed files with 4 additions and 4 deletions

View File

@ -36,7 +36,7 @@ if ! grep -q ":/usr/jails/$username/./home/$username:" /etc/passwd; then
fi fi
# check if any virtualhosts exist # 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 # set virtualhosts array
cd /usr/jails/$username/srv/www/ cd /usr/jails/$username/srv/www/
virtualhosts=(*) virtualhosts=(*)
@ -56,7 +56,7 @@ echo rm -r /usr/jails/$username
# (re)create jail # (re)create jail
echo jk_init -k -j /usr/jails/$username shellstack 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 ln -s /usr/local/sbin/mini_sendmail /usr/jails/$username/usr/sbin/sendmail
echo chmod a+rwx /usr/jails/$username/tmp echo chmod a+rwx /usr/jails/$username/tmp
echo install -d -o $username -g $username -m 755 /usr/jails/$username/home/$username echo install -d -o $username -g $username -m 755 /usr/jails/$username/home/$username

View File

@ -36,7 +36,7 @@ if grep -q ":/usr/jails/$username/./home/$username:" /etc/passwd; then
fi fi
jk_init -k -j /usr/jails/$username shellstack 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 ln -s /usr/local/sbin/mini_sendmail /usr/jails/$username/usr/sbin/sendmail
chmod a+rwx /usr/jails/$username/tmp chmod a+rwx /usr/jails/$username/tmp
install -d -o $username -g $username -m 755 /usr/jails/$username/home/$username install -d -o $username -g $username -m 755 /usr/jails/$username/home/$username

View File

@ -46,6 +46,6 @@ for jail in "${jails[@]}"
do do
for node in "${clusterNodes[@]}" for node in "${clusterNodes[@]}"
do 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
done done