#!/usr/bin/dumb-init /bin/bash ## get the ip address and hostname - set the hostname before starting condor thisip=$(ip -4 route get 1 | awk '{print $NF;exit}') if [ "$thisip" != "" ] ; then thishost=$(host $thisip) 2>/dev/null if [ "$thishost" != "" ] ; then h=$(echo "${thishost##* }") h=$(echo "${h%?}") hostname $h fi fi if [ -x /home/docker/bin/docker-worker-container-setup.sh ] ; then if [ ! -f /etc/condor/docker-worker-container-setup.done ] ; then /home/docker/bin/docker-worker-container-setup.sh fi fi ## set up condor environment before running condor_master in the foreground . /etc/sysconfig/condor /usr/sbin/condor_master -f