mirror of
https://github.com/riptidewave93/UNVR-NAS.git
synced 2025-03-09 15:40:13 +00:00
fix: improvements all around
* add our own fan controller, will need more tuning with time, but it's a great start * add restart/shutdown hooks for ulcmd, so the display shows the state of the system * change how we expose unifi's libs to binaries * Fixup systemd hang at boot due to networking * move ubnthal to systemd task, since we don't load modules due to the unifi initramfs in the prebuilt kernel
This commit is contained in:
parent
459d0a4758
commit
a4f7f862c2
14 changed files with 235 additions and 27 deletions
|
@ -15,7 +15,7 @@ datasource:
|
|||
- omv-salt deploy run hosts
|
||||
- usermod -a -G _ssh debian
|
||||
|
||||
# Setup network for both nics
|
||||
# Setup network for both nics, needed so SFP+ works
|
||||
network:
|
||||
version: 2
|
||||
ethernets:
|
||||
|
|
1
overlay/filesystem/etc/ld.so.conf.d/ubnt.conf
Normal file
1
overlay/filesystem/etc/ld.so.conf.d/ubnt.conf
Normal file
|
@ -0,0 +1 @@
|
|||
/usr/lib/ubnt-fw
|
|
@ -1,7 +0,0 @@
|
|||
# /etc/modules: kernel modules to load at boot time.
|
||||
#
|
||||
# This file contains the names of kernel modules that should be loaded
|
||||
# at boot time, one per line. Lines beginning with "#" are ignored.
|
||||
# Parameters can be specified after the module name.
|
||||
|
||||
ubnthal # used by ulcmd
|
|
@ -0,0 +1,11 @@
|
|||
[Unit]
|
||||
Description=Load UBNT kernel modules
|
||||
|
||||
[Service]
|
||||
User=root
|
||||
Type=oneshot
|
||||
ExecStart=/usr/sbin/modprobe ubnthal
|
||||
RemainAfterExit=yes
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
|
@ -0,0 +1,3 @@
|
|||
[Service]
|
||||
ExecStart=
|
||||
ExecStart=/lib/systemd/systemd-networkd-wait-online --any
|
|
@ -0,0 +1,11 @@
|
|||
[Unit]
|
||||
Description=ulcmd reboot hook
|
||||
DefaultDependencies=no
|
||||
Before=reboot.target
|
||||
|
||||
[Service]
|
||||
ExecStart=/usr/bin/ulcmd --sender system-hook --command restart
|
||||
Type=oneshot
|
||||
|
||||
[Install]
|
||||
WantedBy=reboot.target
|
|
@ -0,0 +1,11 @@
|
|||
[Unit]
|
||||
Description=ulcmd shutdown hook
|
||||
DefaultDependencies=no
|
||||
Before=shutdown.target halt.target
|
||||
|
||||
[Service]
|
||||
ExecStart=/usr/bin/ulcmd --sender system-hook --command poweroff
|
||||
Type=oneshot
|
||||
|
||||
[Install]
|
||||
WantedBy=shutdown.target halt.target
|
15
overlay/filesystem/etc/systemd/system/ulcmd.service
Normal file
15
overlay/filesystem/etc/systemd/system/ulcmd.service
Normal file
|
@ -0,0 +1,15 @@
|
|||
[Unit]
|
||||
Description=Daemon for MCU based LCM control
|
||||
Requires=load-ubnt-modules.service
|
||||
Requires=mock-ubnt-api.service
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
ExecStart=/usr/bin/ulcmd
|
||||
KillMode=process
|
||||
Restart=on-failure
|
||||
RestartSec=2s
|
||||
TimeoutStopSec=2s
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
|
@ -0,0 +1,14 @@
|
|||
[Unit]
|
||||
Description=Fan Controller daemon for the UNVR Pro
|
||||
Requires=load-ubnt-modules.service
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
ExecStart=/usr/bin/unvr-fan-daemon
|
||||
KillMode=process
|
||||
Restart=on-failure
|
||||
RestartSec=2s
|
||||
TimeoutStopSec=2s
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
Loading…
Add table
Add a link
Reference in a new issue