From 38a9484988acfa762f654206ebccc324111df206 Mon Sep 17 00:00:00 2001 From: zimoch Date: Fri, 4 Sep 2020 14:41:35 +0000 Subject: [PATCH] fixes for RHEL7 --- shellbox | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/shellbox b/shellbox index 828a8ec..2fa41a4 100755 --- a/shellbox +++ b/shellbox @@ -3,7 +3,9 @@ # chkconfig: 2345 98 2 # description: shellbox service for spawning programs +HOME=/root . /etc/profile + export PATH=$PATH:/usr/local/bin # AD84: export HOSTNAME=$(hostname -s) @@ -105,12 +107,16 @@ launch () { if /usr/bin/sudo -E true 2> /dev/null then - SUDO="/usr/bin/sudo -H -u $USER SHELLBOX=$HOSTNAME:$PORT" + SUDO="/usr/bin/sudo -H -u $USER SHELLBOX=$HOSTNAME:$PORT EPICS_HOST_ARCH=$EPICS_HOST_ARCH PATH=$PATH" elif /usr/bin/sudo true 2> /dev/null then SUDO="/usr/bin/sudo -H -u $USER" fi - export SHELLBOX=$HOSTNAME:$PORT + + SUDO="/usr/bin/sudo -H -u $USER SHELLBOX=$HOSTNAME:$PORT EPICS_HOST_ARCH=$EPICS_HOST_ARCH PATH=$PATH" + + #export SHELLBOX=$HOSTNAME:$PORT + pidfile=/var/run/procServ-$PORT.pid rm -f $pidfile L=/tmp/$SHELLBOX.log