#!/bin/bash if [ "$1" == "poweroff" ]; then poweroff --halt elif [ "$1" == "reboot" ]; then reboot else echo "Unknown ubnt-systool cmd: $@" >> /tmp/ubnt-systool-unknown.log fi