enable tmp.mount: Raspberry Pi OS and Debian don't have tmpfs mounted on /tmp. So during restore every uploaded chunk would still end up on the SD card before it is un-tar-ed
This commit is contained in:
@@ -58,3 +58,15 @@ WantedBy=multi-user.target
|
||||
EOF
|
||||
ln -sf $HOME/BirdNET-Pi/templates/$TMP_MOUNT /usr/lib/systemd/system
|
||||
}
|
||||
|
||||
install_tmp_mount() {
|
||||
STATE=$(systemctl is-enabled tmp.mount 2>&1 | grep -E '(enabled|disabled)')
|
||||
! [ -f /usr/share/systemd/tmp.mount ] && echo "Warning: no /usr/share/systemd/tmp.mount found"
|
||||
if [ -z $STATE ]; then
|
||||
cp -f /usr/share/systemd/tmp.mount /etc/systemd/system/tmp.mount
|
||||
systemctl daemon-reload
|
||||
systemctl enable tmp.mount
|
||||
else
|
||||
echo "tmp.mount is $STATE, skipping"
|
||||
fi
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user