Files
bsd-apps/unifi/unifi-install.sh
2024-12-05 18:44:10 -07:00

28 lines
501 B
Bash

#!/bin/sh
# Install Unifi Controller
APP_NAME="Unifi"
UNIFI_VERSION="8"
# Check for Root Privileges
if ! [ $(id -u) = 0 ]; then
echo "This script must be run with root privileges"
exit 1
fi
# Install Packages
pkg install -y \
unifi${UNIFI_VERSION}
# Enable and Start Services
sysrc unifi_enable=YES
sysrc mondod_enable=yes
service mongod start
service unifi start
# Done
echo "---------------"
echo "Installation Complete."
echo "${APP_NAME} is running on port 8443"
echo "---------------"