Files
bsd-apps/unifi/unifi-install.sh

28 lines
501 B
Bash
Raw Permalink Normal View History

2024-09-15 15:07:17 -06:00
#!/bin/sh
# Install Unifi Controller
2024-09-29 16:45:57 -06:00
APP_NAME="Unifi"
2024-09-15 15:07:17 -06:00
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
2024-10-18 12:37:11 -06:00
pkg install -y \
unifi${UNIFI_VERSION}
2024-09-15 15:07:17 -06:00
# Enable and Start Services
sysrc unifi_enable=YES
2024-12-05 19:50:25 -07:00
sysrc mongod_enable=yes
2024-12-05 18:44:10 -07:00
service mongod start
2024-09-15 15:07:17 -06:00
service unifi start
2024-09-29 16:45:57 -06:00
# Done
2024-09-15 15:07:17 -06:00
echo "---------------"
echo "Installation Complete."
2024-09-29 16:45:57 -06:00
echo "${APP_NAME} is running on port 8443"
2024-09-15 15:07:17 -06:00
echo "---------------"