fixes for RHEL7

This commit is contained in:
zimoch
2020-09-04 14:41:35 +00:00
parent ef49e1db91
commit 38a9484988
+8 -2
View File
@@ -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