1 2 3 4 5 6 7
#!/usr/bin/bash if [[ "$1" == "poweroff" ]]; then doas poweroff elif [[ "$1" == "reboot" ]]; then doas reboot fi