Epics@GSI Webhome

template script: (re)start soft IOC at Reboot

Code

%begin bash% #!/bin/bash

# ioc-.sh # starts EPICS IOC in background using procServ tool # by defining user specific variables # and # then calling/sourcing ${startBackgroundEpicsIocScript} # which implements those settings # # Author: P.Zumbruch@gsi.de 12/01/2010 # Last modification: 23/02/2010

# uncomment to debug #set -xv

scriptname=ioc-cave.sh startBackgroundEpicsIocScriptName=startBackgroundEpicsIoc.sh useUserDefinedVariables=yes

#specific predefines userDefines() { userProcServTelnetPort= #eg. 4813 userProcServTelnetLogPort=-1 #-1:defaults to userProcServTelnetPort+1 userIOC=ioc--$(hostname) userWorkingDir= #e.g ~scs/apps/hades/iocBoot/ioctemplate; userCommandExecutable= #e.g. "../../bin/linux-x86/hades"; userCommandArgument= #e.g. "st.cmd";

userProcServExecutable=$(which procServ) userProcServDefaultExecutable= #e.g. /usr/local/bin/procServ userLibraryPathAdd= #e.g. /home/scs/apps/hades/hadesApp/src #several paths allowed, separated by colon ':'

[ 0 -ge "${userProcServTelnetLogPort}" ] && unset userProcServTelnetLogPort userCommand="${userCommandExecutable} ${userCommandArgument}"; userProcServLoggingDir=${userWorkingDir} userProcServExecutable=${userProcServExecutable:-${userProcServDefaultExecutable}} }

#look for startBackgroundEpicsIocScriptName startBackgroundEpicsIocScript=$(which $startBackgroundEpicsIocScriptName) startBackgroundEpicsIocScript=${startBackgroundEpicsIocScript:-./${startBackgroundEpicsIocScriptName}}

#start script if available, else report ERROR and exit if [ -f "${startBackgroundEpicsIocScript}" ] then . ${startBackgroundEpicsIocScript} else echo "$scriptname: ERROR could not find main script file \`$startBackgroundEpicsIocScriptName'" exit -1 fi

%end%

Source


-- PeterZumbruch - 03 Mar 2010
Topic revision: r4 - 2010-03-03, PeterZumbruch - This page was cached on 2021-10-18 - 22:44.

This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding GSI Wiki? Send feedback | Imprint (german) | Privacy Policy (german)