diff --git a/rc.d/tailscale b/rc.d/tailscale deleted file mode 100755 index 485075d..0000000 --- a/rc.d/tailscale +++ /dev/null @@ -1,43 +0,0 @@ -#!/bin/sh -# Lifted from https://github.com/tailscale/tailscale/issues/9502#issuecomment-1836514959 -# Generated by sysd2v v0.3 -- http://www.trek.eu.org/devel/sysd2v -# kFreeBSD do not accept scripts as interpreters, using #!/bin/sh and sourcing. -if [ true != "$INIT_D_SCRIPT_SOURCED" ] ; then - set "$0" "$@"; INIT_D_SCRIPT_SOURCED=true . /lib/init/init-d-script -fi -### BEGIN INIT INFO -# Provides: tailscaled -# Required-Start: $remote_fs -# Required-Stop: $remote_fs -# Should-Start: $local_fs NetworkManager systemd-resolved -# Should-Stop: $local_fs NetworkManager systemd-resolved -# Default-Start: 2 3 4 5 -# Default-Stop: 0 1 6 -# Description: Tailscale node agent -### END INIT INFO -set -a -RUNTIME_DIRECTORY=/run/tailscale -STATE_DIRECTORY=/var/lib/tailscale -CACHE_DIRECTORY=/var/cache/tailscale -. /etc/default/tailscaled -set +a - -DAEMON=/usr/sbin/tailscaled -DAEMON_ARGS="--state=/var/lib/tailscale/tailscaled.state --socket=/run/tailscale/tailscaled.sock --port=${PORT} $FLAGS" -PIDFILE=/var/run/tailscaled-sysd2v.pid -START_ARGS="--background --make-pidfile --notify-await" - -do_start_cmd_override () -{ - install -d -m 0755 /run/tailscale || return 2 - install -d -m 0700 /var/lib/tailscale || return 2 - install -d -m 0750 /var/cache/tailscale || return 2 - /usr/sbin/tailscaled --cleanup || return 2 - do_start_cmd || return $? -} - -do_stop_cmd_override () -{ - do_stop_cmd || return $? - /usr/sbin/tailscaled --cleanup || return 2 -} diff --git a/shell/start_debian_vm b/shell/start_debian_vm new file mode 100755 index 0000000..09b5e27 --- /dev/null +++ b/shell/start_debian_vm @@ -0,0 +1,16 @@ +#!/bin/sh +# Purpose: Simple script to start my Debian VM using bhyve on FreeBSD +# Original author: Vivek Gite (https://www.cyberciti.biz) under GPL v2.x+ +# Modifications made by: hyperreal (https://hyperreal.coffee) under GPL v2.x+ + +if ! kldstat | grep -w vmm.ko; then + kldload -v vmm +fi + +if ! kldstat | grep -w nmdm.ko; then + kldload -v nmdm +fi + +if ! bhyve -c 4 -m 8G -w -H -s 0,hostbridge -s 4,virtio-blk,/dev/zvol/zroot/debianvm -s 5,virtio-net,tap0 -s 29,fbuf,tcp=0.0.0.0:5900,w=1024,h=768 -s 30,xhci,tablet -s 31,lpc -l com1,stdio -l bootrom,/usr/local/share/uefi-firmware/BHYVE_UEFI.fd debianvm 2>/tmp/start_debian_vm_error; then + neomutt -s "[nas] start_debian_vm error" jas@nas