Skip to content

Instantly share code, notes, and snippets.

@AstroTom
Last active December 30, 2020 08:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AstroTom/2d0a5674fee66563bb064f682ca5e9c6 to your computer and use it in GitHub Desktop.
Save AstroTom/2d0a5674fee66563bb064f682ca5e9c6 to your computer and use it in GitHub Desktop.
wishtrip boot script to run program at startup
#! /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