#!/bin/bash if [[ -x "$1" ]] then $1 exit $? fi while true do sleep 1 # Running daemon done