Created
July 12, 2019 05:28
-
-
Save johnroyer/88405f29a51ee9b2b3374634f1a086bc to your computer and use it in GitHub Desktop.
init change notification
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/sh | |
### BEGIN INIT INFO | |
# Provides: slackcat | |
# Required-Start: $remote_fs $syslog | |
# Required-Stop: $remote_fs $syslog | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: OpenBSD Secure Shell server | |
### END INIT INFO | |
API="https://hooks.slack.com/services/xxxx/xxxx/xxxxxxxxxxxx" | |
case "$1" in | |
start) | |
echo "system is booting up" | /usr/local/bin/slackcat --url "$API" | |
;; | |
stop) | |
echo "system is shutting down" | /usr/local/bin/slackcat --url "$API" | |
;; | |
esac |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment