Set jail configs with bastille
bastille create $JAILNAME $FREEBSD_RELEASE $ADDR
-bastille stop $JAILNAME
IPV6_ADDR=fdcb:dbd4:3a2f:$(echo $ADDR | cut -d. -f3)::$(echo $ADDR | cut -d. -f4)
-perl -i -n -e "/^}$/ && print \" ip6.addr = \\\"$IPV6_ADDR\\\";\\n\"; print" /usr/local/bastille/jails/$JAILNAME/jail.conf
-bastille start $JAILNAME
+bastille config $JAILNAME set ip6.addr $IPV6_ADDR
+bastille restart $JAILNAME
bastille pkg $JAILNAME install -y $PACKAGES
bastille cmd $JAILNAME pw user add mastodon -m -h -
bastille create $JAILNAME $FREEBSD_RELEASE $ADDR
bastille stop $JAILNAME
-perl -i -n -e '/^}$/ && print " sysvshm = new;\n sysvmsg = new;\n sysvsem = new;\n"; print' /usr/local/bastille/jails/$JAILNAME/jail.conf
+bastille config $JAILNAME set sysvshm new
+bastille config $JAILNAME set sysvmsg new
+bastille config $JAILNAME set sysvsem new
bastille start $JAILNAME
bastille template $JAILNAME ./postgres