All pastes #80395 Raw Edit

Anonymous

public text v1 · immutable
·published 2006-07-06 11:21 UTC
rendered paste body
#!/usr/local/bin/bash

if [ -e /tmp/$1.lock ]; then
  echo "Could not execute $1 due to lockfile..." | mail -s "LOCKFILE: your.domain.tld - error running $1" runlock@domain.tld
  exit 1;
fi

touch /tmp/$1.lock

$2

rm /tmp/$1.lock