Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
# Uses a PID file to add daemon-like behavior to an arbitrary program.
################################################################################
# RHEL 6 doesn't include `realpath' in coreutils
function expandDir {
set +x
typeset DIR=$1
if [[ ! -d $DIR ]]; then
DIR=${1%/*}