unifios-utilities/on-boot-script
2020-07-05 21:53:55 -07:00
..
dpkg-build-files/debian Fixing package generation scripts, dpkg was messing with them. 2020-07-05 21:53:55 -07:00
examples Modularization updates (#12) 2020-06-28 06:02:50 -07:00
packages Fixing package! 2020-07-05 21:43:46 -07:00
install-unifios.sh Modularization updates (#12) 2020-06-28 06:02:50 -07:00
install.sh Modularization updates (#12) 2020-06-28 06:02:50 -07:00
README-MANUALmd on-boot now persists through firmware updates 2020-07-05 20:09:26 -07:00
README.md Fixing bad command 2020-07-05 21:50:12 -07:00

UDM / UDMPro Boot Script

Features

  1. Allows you to run a shell script at S95 anytime your UDM starts / reboots
  2. Persists through reboot and firmware updates! It is able to do this because Ubiquiti caches all debian package installs on the UDM in /mnt/data, then re-installs them on every boot

Compatibility

  1. Should work on any UDM/UDMPro after 1.6.3
  2. Tested and confirmed on 1.6.6, 1.7.0, 1.7.2rc4, 1.7.3rc1

Upgrade from earlier way

  • As long as you didn't change the filenames, installing the deb package is all you need to do. If you want to clean up beforehand anyways....
rm /etc/init.d/udm.sh
systemctl disable udmboot
rm /etc/systemd/system/udmboot.service
  • The new package is exactly the old steps packaged in a debian package
  • dpkg-build-files contains the scripts that build the package (using dh_make and debuild) if you want to build it yourself / change it
  • Built on Ubuntu-20.04 on Windows 10/WSL2

Steps

  1. Get into the unifios shell on your udm
unifi-os shell
  1. Download the udm-boot_1.0.0-1_all.deb and install it and go back to the UDM
curl -L https://raw.githubusercontent.com/boostchicken/udm-utilities/master/on-boot-script/packages/udm-boot_1.0.0-1_all.deb -o udm-boot_1.0.0-1_all.deb
dpkg -i udm-boot_1.0.0-1_all.deb
exit
  1. Copy any shell scripts you want to run to /mnt/data/on_boot.d and make sure they are executable and have the correct shebang (#!/bin/sh) Examples: