+ #make pid dir
+ pidfile="/var/run/$jenkinsuser/jenkins_jnlp_pid"
+ if ! [ -d /var/run/$jenkinsuser/ ]; then
+ mkdir /var/run/$jenkinsuser/
+ chown $jenkinsuser:$jenkinsuser /var/run/$jenkinsuser/
+ fi
+
+ if [[ $skip_monit != true ]]; then
+ #check for monit
+ if [ $(which monit) ]; then
+ echo "monit installed"
+ else
+ if [ -n "$(command -v yum)" ]; then
+ echo "please install monit; eg: yum -y install monit"
+ exit 1
+ elif [ -n "$(command -v apt-get)" ]; then
+ echo "please install monit; eg: apt-get install -y monit"
+ exit 1
+ else
+ echo "system not supported plese contact help desk"
+ exit 1
+ fi
+ fi
+ fi
+
+ makemonit () {
+ echo "Writing the following as monit config:"
+ cat << EOF | tee $monitconfdir/jenkins