#!/bin/sh # # PROVIDE: opnsensify # REQUIRE: SERVERS # KEYWORD: firstboot . /etc/rc.subr name="opnsensify" desc="Convert to OPNSense" start_cmd="opnsensify_start" stop_cmd=":" rcvar="opnsensify_enable" opnsensify_start() { fetch -o /tmp/opnsense-bootstrap.sh https://raw.githubusercontent.com/opnsense/update/master/src/bootstrap/opnsense-bootstrap.sh.in sh /tmp/opnsense-bootstrap.sh -r 24.7 -y rm /tmp/opnsense-bootstrap.sh cp -r /home/freebsd/.ssh /root/.ssh sed -i '' -e "s/^#PermitRootLogin/PermitRootLogin/g" /usr/local/etc/ssh/sshd_config rm -f /firstboot cp /conf/config.xml.ovh /conf/config.xml reboot } load_rc_config $name run_rc_command "$1"