[bin] newjail script and screencap
This commit is contained in:
@ -0,0 +1,27 @@
|
||||
#!/bin/sh
|
||||
# Create the jail with dhcp on
|
||||
iocage create -r 12.2-RELEASE --name $1 dhcp=on
|
||||
|
||||
# Install avahi and .local DNS
|
||||
iocage exec -f $1 "pkg install -y avahi-app dbus nss_mdns && sysrc dbus_enable="YES" && sysrc avahi_daemon_enable="YES""
|
||||
iocage exec $1 sed -i -e '/^hosts/s/dns/mdns dns/' /etc/nsswitch.conf
|
||||
iocage exec $1 "service dbus start && service avahi-daemon start"
|
||||
|
||||
|
||||
# Copy our jail public key to allow login
|
||||
mkdir /zroot/iocage/jails/$1/root/root/.ssh
|
||||
cp .ssh/jails.pub /zroot/iocage/jails/$1/root/root/.ssh/authorized_keys
|
||||
|
||||
# Allow root login and start SSH
|
||||
iocage exec $1 sed -i -e '/^#PermitRootLogin/s/#Permit/Permit/' /etc/ssh/sshd_config
|
||||
iocage exec $1 sed -i -e '/^PermitRootLogin/s/no/yes/' /etc/ssh/sshd_config
|
||||
iocage exec $1 sysrc sshd_enable="YES"
|
||||
iocage exec $1 service sshd start
|
||||
|
||||
# Add our new IP address to our unbound local zone
|
||||
ip_address=$(iocage exec $1 ifconfig epair0b | grep 'inet ' | awk '{print $2}')
|
||||
echo 'local-data: "'$1'.local IN A '$ip_address'"' >> /zroot/iocage/jails/dns/root/var/unbound/local.zones
|
||||
iocage exec dns service unbound restart
|
||||
|
||||
|
||||
|
||||
|
||||
@ -4,4 +4,5 @@
|
||||
REC_iface=$(pactl list sources short | awk '{print$2}' | grep 'monitor')
|
||||
SCREEN_res=$(xrandr -q --current | grep '*' | awk '{print$1}')
|
||||
|
||||
ffmpeg -f x11grab -r 25 -s 1920x1080 -i :0.0 -vcodec libx264 output.mkv
|
||||
#ffmpeg -f x11grab -r 25 -s 1920x1080 -i :0.0 -vcodec libx264 -f alsa -ac 2 -i pulse -acodec aac output.mkv
|
||||
ffmpeg -video_size 1920x1080 -framerate 25 -f x11grab -i :0.0 -f alsa -ac 2 -i pulse ~/tmp/output.mp4
|
||||
|
||||
Reference in New Issue
Block a user