updates Jun 11
This commit is contained in:
		@ -1,14 +0,0 @@
 | 
			
		||||
#!/bin/sh
 | 
			
		||||
#
 | 
			
		||||
# Copyright (c) 2018-2020, diyIT.org
 | 
			
		||||
# All rights reserved.
 | 
			
		||||
#
 | 
			
		||||
# BSD 2-Clause License ("Simplified BSD License" or "FreeBSD License")
 | 
			
		||||
# https://diyit.org/license/
 | 
			
		||||
#
 | 
			
		||||
#
 | 
			
		||||
 | 
			
		||||
ifconfig tun181 create
 | 
			
		||||
#ifconfig bridge1 addm tap181 up
 | 
			
		||||
#ifconfig tap181 up
 | 
			
		||||
#ifconfig tap181 inet6 auto_linklocal
 | 
			
		||||
@ -28,6 +28,11 @@ ifconfig bridge1 addm tap84 up
 | 
			
		||||
ifconfig tap84 up
 | 
			
		||||
ifconfig tap84 inet6 auto_linklocal
 | 
			
		||||
 | 
			
		||||
ifconfig tap85 create
 | 
			
		||||
ifconfig bridge1 addm tap85 up
 | 
			
		||||
ifconfig tap85 up
 | 
			
		||||
ifconfig tap85 inet6 auto_linklocal
 | 
			
		||||
 | 
			
		||||
ifconfig tap90 create
 | 
			
		||||
ifconfig bridge1 addm tap90 up
 | 
			
		||||
ifconfig tap90 up
 | 
			
		||||
 | 
			
		||||
@ -18,12 +18,12 @@ do
 | 
			
		||||
 | 
			
		||||
bhyve -c sockets=1,cores=2,threads=2 -m 16G -S -A -H -P \
 | 
			
		||||
-s 0,hostbridge \
 | 
			
		||||
-s 4,ahci-hd,/dev/zvol/ship/raw/windows,sectorsize=512 \
 | 
			
		||||
-s 5,virtio-net,tap81,mac=00:0A:0B:0C:0D:81 \
 | 
			
		||||
-s 6,ahci-hd,/dev/zvol/ship/raw/windows_data,sectorsize=512 \
 | 
			
		||||
-s 29,fbuf,tcp=0.0.0.0:5981,w=1600,h=900 \
 | 
			
		||||
-s 4,ahci-hd,/dev/zvol/ship/raw/r-windows,sectorsize=512 \
 | 
			
		||||
-s 5,virtio-net,tap85,mac=00:0A:0B:0C:0D:85 \
 | 
			
		||||
-s 6,ahci-hd,/dev/zvol/ship/raw/r-windows_data,sectorsize=512 \
 | 
			
		||||
-s 29,fbuf,tcp=0.0.0.0:5985,w=1600,h=900 \
 | 
			
		||||
-s 30,xhci,tablet \
 | 
			
		||||
-s 31,lpc -l com1,/dev/nmdm81A \
 | 
			
		||||
-s 31,lpc -l com1,/dev/nmdm85A \
 | 
			
		||||
-l bootrom,/usr/local/share/uefi-firmware/BHYVE_UEFI.fd \
 | 
			
		||||
r-windows
 | 
			
		||||
 | 
			
		||||
@ -53,14 +53,14 @@ exit $?
 | 
			
		||||
 | 
			
		||||
# bhyvectl --get-all --vm=r-windows
 | 
			
		||||
 | 
			
		||||
# cu -l /dev/nmdm81B
 | 
			
		||||
# cu -l /dev/nmdm85B
 | 
			
		||||
# (This uses cu() so press ~+Ctrl-D to exit)
 | 
			
		||||
 | 
			
		||||
#on base system:
 | 
			
		||||
#zfs create -V 32G -o refreservation=none ship/raw/r-windows
 | 
			
		||||
#zfs create -V 128G -o refreservation=none ship/raw/r-windows_data
 | 
			
		||||
#zfs create -V 256G -o refreservation=none ship/raw/r-windows_data
 | 
			
		||||
# on boot
 | 
			
		||||
#ifconfig tap81 create
 | 
			
		||||
#ifconfig bridge1 addm tap81 up
 | 
			
		||||
#ifconfig tap81 up
 | 
			
		||||
#ifconfig tap81 inet6 auto_linklocal
 | 
			
		||||
#ifconfig tap85 create
 | 
			
		||||
#ifconfig bridge1 addm tap85 up
 | 
			
		||||
#ifconfig tap85 up
 | 
			
		||||
#ifconfig tap85 inet6 auto_linklocal
 | 
			
		||||
 | 
			
		||||
@ -18,10 +18,10 @@ tmux new-session -d -s $session -n freepbx
 | 
			
		||||
tmux selectp -t 1
 | 
			
		||||
tmux send-keys "cd /mnt/config;./pbx.sh" C-m
 | 
			
		||||
 | 
			
		||||
# create a new window r-windows
 | 
			
		||||
tmux new-window -t $session:1 -n r-windows
 | 
			
		||||
# create a new window windows
 | 
			
		||||
tmux new-window -t $session:1 -n windows
 | 
			
		||||
tmux selectp -t 1
 | 
			
		||||
tmux send-keys "cd /mnt/config;./r-windows.sh" C-m
 | 
			
		||||
tmux send-keys "cd /mnt/config;./windows.sh" C-m
 | 
			
		||||
 | 
			
		||||
# create a new window ubuntu
 | 
			
		||||
tmux new-window -t $session:2 -n ubuntu
 | 
			
		||||
@ -38,6 +38,11 @@ tmux new-window -t $session:4 -n w2019
 | 
			
		||||
tmux selectp -t 1
 | 
			
		||||
tmux send-keys "cd /mnt/config;./w2019.sh" C-m
 | 
			
		||||
 | 
			
		||||
# create a new window r-windows
 | 
			
		||||
tmux new-window -t $session:5 -n r-windows
 | 
			
		||||
tmux selectp -t 1
 | 
			
		||||
tmux send-keys "cd /mnt/config;./r-windows.sh" C-m
 | 
			
		||||
 | 
			
		||||
# return to main window
 | 
			
		||||
tmux select-window -t $session:0
 | 
			
		||||
tmux selectp -t 1
 | 
			
		||||
 | 
			
		||||
@ -12,7 +12,8 @@ web_jails=(cloud hub nivi rachna rishabh sharad web web-diyit ldap-mgr r-ldap-mg
 | 
			
		||||
 | 
			
		||||
for i in ${web_jails[@]};
 | 
			
		||||
do
 | 
			
		||||
	echo "## checking $i JAIL configs after Apache and/or PHP updates ##"
 | 
			
		||||
	echo ""
 | 
			
		||||
    echo "## checking $i JAIL configs after Apache and/or PHP updates ##"
 | 
			
		||||
	iocage exec $i "diff /usr/local/etc/apache24/httpd.conf /mnt/config/httpd.conf"
 | 
			
		||||
	iocage exec $i "diff /usr/local/etc/php.ini /mnt/config/php.ini"
 | 
			
		||||
    if [[ "$i" != "ldap-mgr" && "$i" != "r-ldap-mgr" ]]; then
 | 
			
		||||
@ -21,14 +22,20 @@ do
 | 
			
		||||
	echo "####"
 | 
			
		||||
done
 | 
			
		||||
 | 
			
		||||
echo ""
 | 
			
		||||
echo "check in output above if php.ini or php-fpm also need to be restored"
 | 
			
		||||
 | 
			
		||||
echo ""
 | 
			
		||||
read -p "Return/Enter to restore httpd.conf files, ctrl-c to abort? " RESP
 | 
			
		||||
 | 
			
		||||
for i in ${web_jails[@]};
 | 
			
		||||
do
 | 
			
		||||
	echo ""
 | 
			
		||||
	echo "restoring httpd.conf in web_jail $i after Apache update"
 | 
			
		||||
	iocage exec $i "cp /mnt/config/httpd.conf /usr/local/etc/apache24/httpd.conf"
 | 
			
		||||
	iocage exec $i "service apache24 restart"
 | 
			
		||||
done
 | 
			
		||||
 | 
			
		||||
echo "check in output above if php.ini or php-fpm need to be restored"
 | 
			
		||||
echo "check pkgp jail nginx instance is running"
 | 
			
		||||
echo ""
 | 
			
		||||
echo "checking pkgp jail nginx instance is running"
 | 
			
		||||
iocage exec nginx "service nginx staus" service nginx status
 | 
			
		||||
 | 
			
		||||
@ -66,6 +66,10 @@ for i in `iocage list -h | cut -f 2`;
 | 
			
		||||
do
 | 
			
		||||
	echo "## $i JAIL ##"
 | 
			
		||||
 | 
			
		||||
    if [ $i == "pkgp" ] || [ $i == "debian"]; then
 | 
			
		||||
        continue;
 | 
			
		||||
    fi
 | 
			
		||||
 | 
			
		||||
	iocage exec $i "pkg update"
 | 
			
		||||
 | 
			
		||||
	if [[ "$i" == "ldap" || "$i" == "r-ldap" ]]; then
 | 
			
		||||
@ -92,17 +96,17 @@ do
 | 
			
		||||
done
 | 
			
		||||
 | 
			
		||||
echo "NOTES:"
 | 
			
		||||
 | 
			
		||||
echo ""
 | 
			
		||||
echo "update base system by running:"
 | 
			
		||||
echo "pkg update"
 | 
			
		||||
echo "pkg autoremove -y"
 | 
			
		||||
echo "pkg upgrade -y"
 | 
			
		||||
echo "pkg clean -ay"
 | 
			
		||||
 | 
			
		||||
echo ""
 | 
			
		||||
echo "iocage stop ALL"
 | 
			
		||||
echo "iocage start ALL"
 | 
			
		||||
 | 
			
		||||
echo "hub check for index.html and adminer version"
 | 
			
		||||
 | 
			
		||||
echo ""
 | 
			
		||||
echo "check hub for index.html and adminer version"
 | 
			
		||||
echo ""
 | 
			
		||||
echo "iocage exec cert \"/root/.acme.sh/acme.sh --upgrade\""
 | 
			
		||||
echo "iocage exec cert \"cp -r /root/.acme.sh /mnt/certs\""
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user