Skip to content

Commit

Permalink
in manage.sh, select the correct path to pvWebMonitor executable
Browse files Browse the repository at this point in the history
  • Loading branch information
prjemian committed Apr 27, 2016
1 parent 8102d1b commit c710c6e
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 25 deletions.
5 changes: 1 addition & 4 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,7 @@
CHANGES
=======

:2016.0427.0: change line endings in manage.sh
:2016.0425.0: improve the setup of manage.sh on Linux
:2016.0424.0: user can add additional file extension patterns
:2016.0423.0: fix setup flaw
:2016.0427.1: improve the setup of manage.sh on Linux, user can add additional file extension patterns
:2016.0414.2: resolve ValueError when creating XML declaration
:2015.0515.0: CRLF to unix from a unix system
:2015.0205.0: report the PV's .RTYP value if known
Expand Down
2 changes: 1 addition & 1 deletion src/pvWebMonitor/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
__description__ = u'post EPICS PVs to read-only web page'
__long_description__ = __description__

__version__ = u'2016.0427.0'
__version__ = u'2016.0427.1'
__release__ = __version__
__author__ = u'Pete R. Jemian'
__email__ = u'[email protected]'
Expand Down
1 change: 0 additions & 1 deletion src/pvWebMonitor/project/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,5 @@
<pattern value="*.xsl" /> <!-- XML stylesheets -->
<pattern value="*.txt" /> <!-- text -->
<pattern value="*.pdf" /> <!-- documentation -->
<pattern value="*.rrd" /> <!-- round-robin databases -->

</pvWebMonitor__config>
38 changes: 19 additions & 19 deletions src/pvWebMonitor/project/manage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,21 +24,21 @@ get_pid(){


check_pid_running(){
get_pid
if [ "${PID}" == "" ]; then
# no PID in the PIDFILE
RETVAL=1
else
RESPONSE=`ps -p ${PID} -o comm=`
if [ "${RESPONSE}" == "pvWebMonitor" ]; then
# PID matches the pvWebMonitor profile
RETVAL=0
else
# PID is not pvWebMonitor
RETVAL=1
fi
fi
return $RETVAL
get_pid
if [ "${PID}" == "" ]; then
# no PID in the PIDFILE
RETVAL=1
else
RESPONSE=`ps -p ${PID} -o comm=`
if [ "${RESPONSE}" == "pvWebMonitor" ]; then
# PID matches the pvWebMonitor profile
RETVAL=0
else
# PID is not pvWebMonitor
RETVAL=1
fi
fi
return $RETVAL
}


Expand All @@ -57,7 +57,7 @@ stop(){
check_pid_running

if [ $RETVAL == 1 ]; then
/bin/echo "# [$0 `/bin/date`] not running ${PID}: ${EXECUTABLE_SCRIPT}" 2>&1 >> ${LOGFILE} &
/bin/echo "# [$0 `/bin/date`] not running ${PID}: ${EXECUTABLE_SCRIPT}" 2>&1 >> ${LOGFILE} &
else
kill ${PID}
/bin/echo "# [$0 `/bin/date`] stopped ${PID}: ${EXECUTABLE_SCRIPT}" 2>&1 >> ${LOGFILE} &
Expand Down Expand Up @@ -91,10 +91,10 @@ checkup(){
get_pid
check_pid_running
if [ $RETVAL == 0 ]; then
echo "# [$0 `/bin/date`] running fine, so it seems" 2>&1 > /dev/null
echo "# [$0 `/bin/date`] running fine, so it seems" 2>&1 > /dev/null
else
echo "# [$0 `/bin/date`] could not identify running process ${PID}, starting new process" 2>&1 >> ${LOGFILE}
start
echo "# [$0 `/bin/date`] could not identify running process ${PID}, starting new process" 2>&1 >> ${LOGFILE}
start
fi
}

Expand Down

0 comments on commit c710c6e

Please sign in to comment.