unifios-utilities/on-boot-script
Thomas Spalinger 282b9bd3ce
Some build and package improvements (#45)
* add missing package version to change log

* fix some warnings of lintian during deb build

* simplification of the debian package

* introduce build script with docker/podman support

* use already existing ssh proxy, has the nice effect of not displaying the welcome message

* update readme for 1.0.2

* fix missing argument in apt-get autoremove
2020-09-08 02:54:51 -07:00
..
dpkg-build-files Some build and package improvements (#45) 2020-09-08 02:54:51 -07:00
examples Create 20-ntopng-udm.sh (#17) 2020-07-11 12:01:55 -07:00
manual-install Fixing install steps 2020-07-05 22:16:32 -07:00
packages Some build and package improvements (#45) 2020-09-08 02:54:51 -07:00
build_deb.sh Some build and package improvements (#45) 2020-09-08 02:54:51 -07:00
Dockerfile Some build and package improvements (#45) 2020-09-08 02:54:51 -07:00
README.md Some build and package improvements (#45) 2020-09-08 02:54:51 -07:00
README.old.md Cleaning up Markdowns 2020-07-12 22:37:04 -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, 1.8.0rc7, 1.8.0

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
    
  • build_deb.sh can be used to build the package by yourself.

    • dpkg-build-files contains the sources that debuild uses to build the package if you want to build it yourself / change it
    • by default it uses docker or podman to build the debian package
    • use ./build_deb.sh build to not using a container
    • the resulting package will be in packages/
  • Built on Ubuntu-20.04 on Windows 10/WSL2

Steps

  1. Get into the unifios shell on your udm

    unifi-os shell
    
  2. Download udm-boot_1.0.2_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.2_all.deb -o udm-boot_1.0.2_all.deb
    dpkg -i udm-boot_1.0.2_all.deb
    exit
    
  3. Copy any shell scripts you want to run to /mnt/data/on_boot.d on your UDM (not the unifi-os shell) and make sure they are executable and have the correct shebang (#!/bin/sh)

    Examples:

Version History

1.0.2

  • Some build improvements and more clean installation

1.0.1

  • Fully automated install, all that is left is populating /mnt/data/on_boot.d

1.0.0

  • First release that persists through firmware