Files
rust-discovery/crates/server/src/bootstrap/opnsense.sh
T

14 lines
547 B
Bash

#!/bin/sh
# OPNsense (FreeBSD amd64). Usage as root: sh opnsense.sh https://bootstrap.example
set -eu
umask 077
if [ "$(id -u)" != 0 ]; then
echo 'Bitte als root ausfuehren (Konsole: Option 8, Shell).' >&2; exit 1
fi
if [ "$(uname -s)" != FreeBSD ] || [ ! -x /usr/local/sbin/opnsense-version ] || [ ! -x /usr/local/bin/python3 ]; then
echo 'Dieses Installationsskript ist nur fuer OPNsense.' >&2; exit 1
fi
work=$(mktemp -d /var/tmp/discovery-install.XXXXXX)
trap 'rm -rf "$work"' EXIT
cat >"$work/install-files.sh" <<'RMM_OPNSENSE_FILES'