Skip to content

Instantly share code, notes, and snippets.

View gerdriesselmann's full-sized avatar

Gerd Riesselmann gerdriesselmann

View GitHub Profile
@gerdriesselmann
gerdriesselmann / restart_on_change.sh
Created December 30, 2014 21:11
Restart service if binary has changed
#!/bin/bash
SERVICE="{service_name}"
FILE="{/path/to/service/binary}"
FINGERPRINT="/root/watchers/$SERVICE.md5"
fingerprint_expected=$(/usr/bin/md5sum "$FILE")
if [ ! -e "$FINGERPRINT" ]
then
echo "$fingerprint_expected" > "$FINGERPRINT"

Keybase proof

I hereby claim:

  • I am gerdriesselmann on github.
  • I am gerdriesselmann (https://keybase.io/gerdriesselmann) on keybase.
  • I have a public key whose fingerprint is 17D7 FB06 5917 95EE 605A 7776 BC1A 26A8 EDA0 C40E

To claim this, I am signing this object: