Last active
December 30, 2020 08:18
-
-
Save AstroTom/2d0a5674fee66563bb064f682ca5e9c6 to your computer and use it in GitHub Desktop.
wishtrip boot script to run program at startup
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/bash | |
### BEGIN INIT INFO | |
# Provides: Wishtrip-boot | |
# Required-Start: $local_fs $remote_fs $network $syslog $named | |
# Required-Stop: $local_fs $remote_fs $network $syslog $named | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: starts wishtrip services | |
# Description: starts wishtrip services | |
### END INIT INFO | |
# Name - wishtrip-boot | |
# | |
# wishtrip boot script to run program at startup | |
# to be installed as boot service | |
# | |
# Install as a (early) service with: | |
# update-rc.d wishtrip-boot defaults 05 | |
# Remove with: | |
# update-rc.d -f wishtrip-boot remove | |
# | |
logger -t wishtrip "Starting $0" | |
CMD=/opt/wishtrip/register-from-tags.sh | |
if [ -x $CMD ] | |
then | |
logger -t wishtrip "About to run $CMD" | |
$CMD | |
else | |
logger -t wishtrip "ERROR: No executable $CMD found." | |
fi | |
logger -t wishtrip "Finished $0" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment