#!/bin/sh # filename: storescpd # # BOOT script: 04-Mar-2005 (eNlf v0.2) # # purpose : start OFFIS DCMTK storescp server at boot time LD_LIBRARY_PATH=/opt/sfw/lib:/usr/lib:/usr/local/lib export LD_LIBRARY_PATH DCMDICTPATH=/usr/local/dcmtk/lib/dicom.dic export DCMDICTPATH tos=1 ss=PETCT od="/home/patient/.viewercd" port=10400 killproc() { # kill the named process(es) pid=`/bin/ps -e -o pid,args | /bin/grep $1 | /bin/grep -v grep | awk '{ print $1}'` [ "$pid" != "" ] && kill $pid } case $1 in 'start') /usr/local/dcmtk/bin/storescp --eostudy-timeout $tos --write-xfer-little --exec-on-reception "/home/patient/bin/viewercd.sh" --sort-conc-studies $ss --output-directory "$od" $port & ;; 'stop') killproc storescp ;; *) echo "usage: storescpd {start|stop}" ;; esac