-
Notifications
You must be signed in to change notification settings - Fork 26
/
storescp.sh
executable file
·39 lines (29 loc) · 1.12 KB
/
storescp.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/usr/bin/env bash
SYNOPSIS="
NAME
storescp.sh
SYNPOSIS
storescp.sh [-p <port>] \\
[-E <execRootPath>] \\
[-D <dataRootPath>]
DESC
'storescp.sh' is a simple wrapper around a 'storescp' listener
service. Due to complexities in embedding the full storescp
command in an xinet.d service file, an alternate solution is
to place a simpler script in the service file. This script in
turn launches the actual listener.
"
PORT=10402
EXECROOTPATH="/usr/local/bin"
DATAROOTPATH="/home/dicom"
TMPINCOMINGDATA=/tmp/data
while getopts "p:E:D:t:" opt; do
case $opt in
t) TMPINCOMINGDATA=$OPTARG ;;
p) PORT=$OPTARG ;;
E) EXECROOTPATH=$OPTARG ;;
D) DATAROOTPATH=$OPTARG ;;
esac
done
mkdir $TMPINCOMINGDATA
eval storescp -od $TMPINCOMINGDATA -pm -sp -xcr \"$EXECROOTPATH/px-repack --xcrdir \#p --xcrfile \#f --verbosity 0 --logdir $DATAROOTPATH/log --datadir $DATAROOTPATH/data --cleanup\" $PORT