-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathtatin.sh
43 lines (34 loc) · 875 Bytes
/
tatin.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
40
41
42
#!/bin/bash
# Was used to fire up a Tatin server before we went "Docker"
DYALOGDIR=/opt/mdyalog/18.2/64/unicode/
RIDEPORT=0
ARGS=""
export MAXWS=1G
export DYALOG_NETCORE=1
Usage ()
{
echo "Usage: $0 [-p ride_port] <args for apl>"
exit 1
}
while [ $# -ne 0 ]
do
case $1 in
-p) [ $# -le 1 ] && Usage
shift ; RIDEPORT=$1
;;
*) ARGS="$ARGS $1"
;;
esac
shift
done
if [ $RIDEPORT -ne 0 ] # Use zero to unset the RIDE_INIT variable
then
export RIDE_INIT="SERVE:*:$RIDEPORT"
if [ 0 -ne `netstat -an | grep -c $RIDEPORT` ]
then
echo "Port $RIDEPORT already in use; bailing"
exit 2
fi
fi
echo $RIDE_LISTEN dyalog $ARGS
dyalog Server.dws "${ARGS}" +s