fix: ensure unvrpro services don't exist on unvr

This is for https://github.com/riptidewave93/UNVR-NAS/issues/12, but we want to make sure UNVRPRO only services do not exist on the normal UNVR.
This commit is contained in:
Chris Blake 2024-06-16 14:49:16 -05:00
parent 7c35890137
commit 76c17952a7
2 changed files with 21 additions and 7 deletions

View file

@ -20,12 +20,16 @@ apt-mark hold linux-image-* # We do not want these, as we run our own kernel!
# Setup our services
systemctl enable ubnt-init
systemctl enable mock-ubnt-api
systemctl enable ulcmd
systemctl enable ulcmd-reboot-hook
systemctl enable ulcmd-shutdown-hook
systemctl enable unvr-fan-daemon
# Do we have ulcmd? if so, we are UNVRPRO so enable ulcmd services
if [ -f "/usr/bin/ulcmd" ]; then
systemctl enable mock-ubnt-api
systemctl enable ulcmd
systemctl enable ulcmd-reboot-hook
systemctl enable ulcmd-shutdown-hook
fi
# Now that we have our wanted kernel in place, do the rest of our installs
apt-get -o Dpkg::Options::="--force-confold" -y --allow-downgrades \
--allow-remove-essential --allow-change-held-packages install cloud-init \
@ -67,9 +71,9 @@ jq --null-input --compact-output \
jq --null-input --compact-output \
"{uuid: \"fa4b1c66-ef79-11e5-87a0-0002b3a176b4\", devicename: \"enp0s2\", method: \"dhcp\", method6: \"auto\"}" | \
omv-confdbadm update "conf.system.network.interface" -
# Set hostname
omv-confdbadm update "conf.system.network.dns" "{\"hostname\": \"unvr-nas\"}"
sed -i "s|myhostname = .*|myhostname = unvr-nas|g" /etc/postfix/main.cf
# Cleanup stuff we don't want floating around
apt-get autoclean || true