blob: 71c2f40d9d2f2c465ce4f69b388fd1f0d171a6fd (
plain)
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
43
44
45
46
47
48
|
#!/bin/sh
function usage() {
cat << EOF
Usage: jatwisd [options]
--help
display (this) help message
-h, --https <https url>
poll url using https
-s, --sftp <sftp url>
poll url using sftp
-e, --exec
script to run if the url is reachable
-t, --timeout
timeout period (in milliseconds)
-f, --freq, --frequency
polling frequency
-l, --lockfile
set lockfile location and enable lockfile checking
See jatwisd(1) for more info
EOF
}
while [ "$1" != "" ]; do
PARAM=`echo $1 | awk -F= '{print $1}'`
VALUE=`echo $1 | awk -F= '{print $2}'`
case $PARAM in
--help)
usage
exit
;;
*)
echo "ERROR: unknown parameter \"$PARAM\""
usage
exit 1
;;
esac
shift
done
|