Skip to content

fdcastel/unifi-dawn

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

unifi-dawn

Run custom scripts on Unifi OS Startup.

How to install

  1. Run:

    ⚠️ Please review the installer source code before running it on your system. ⚠️

    wget -O - https://raw.githubusercontent.com/fdcastel/unifi-dawn/master/install.sh | bash
  2. Put your scripts in /data/unifi-dawn.d/ directory.

    • Each script MUST start with a shebang or the initialization will fail.
    • Also, remember to chmod +x them. Non-executable files will be ignored.

Usage

On Unifi OS startup, as soon as the network becomes available, the scripts from /data/unifi-dawn.d/ will be executed in alphabetical order.

  • To check the service status:

    systemctl status unifi-dawn
  • To see the scripts output (logs):

    journalctl -u unifi-dawn

Sample script

SCRIPT_FILE=/data/unifi-dawn.d/10-test-download.sh
cat > $SCRIPT_FILE <<EOF
#!/bin/bash

wget -4 -O /tmp/temp.sh https://raw.githubusercontent.com/fdcastel/unifi-dawn/master/install.sh
EOF
chmod +x $SCRIPT_FILE

To uninstall

# Remove service link (uninstall service)
systemctl disable unifi-dawn.service

# Remove script file
rm /etc/systemd/system/unifi-dawn.service

Reference

About

Run custom scripts on Unifi OS Startup

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages