annotate scripts/freeDiameter-trig.sh @ 3:0e343724004b

Added a short documentation
author Sebastien Decugis <sdecugis@nict.go.jp>
date Fri, 18 Jun 2010 14:46:26 +0900
parents 9e5a3c884de6
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
9e5a3c884de6 Initial import of the virtual testbed.
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1 #!/bin/bash -x
9e5a3c884de6 Initial import of the virtual testbed.
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2
3
0e343724004b Added a short documentation
Sebastien Decugis <sdecugis@nict.go.jp>
parents: 0
diff changeset
3 # Usage: ./$0 [loop]
0e343724004b Added a short documentation
Sebastien Decugis <sdecugis@nict.go.jp>
parents: 0
diff changeset
4 # If "loop" is specified on the command line, the signal
0e343724004b Added a short documentation
Sebastien Decugis <sdecugis@nict.go.jp>
parents: 0
diff changeset
5 # will be sent every 10 seconds. Otherwise, it is only sent once.
0e343724004b Added a short documentation
Sebastien Decugis <sdecugis@nict.go.jp>
parents: 0
diff changeset
6
0e343724004b Added a short documentation
Sebastien Decugis <sdecugis@nict.go.jp>
parents: 0
diff changeset
7 # Note: if the daemon is restarted (changes its PID), this script
0e343724004b Added a short documentation
Sebastien Decugis <sdecugis@nict.go.jp>
parents: 0
diff changeset
8 # must also be restarted.
0e343724004b Added a short documentation
Sebastien Decugis <sdecugis@nict.go.jp>
parents: 0
diff changeset
9
0
9e5a3c884de6 Initial import of the virtual testbed.
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
10 PID=`ps --no-heading -C freeDiameterd -o '%p'`;
9e5a3c884de6 Initial import of the virtual testbed.
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
11 if [ "$1" = "loop" ];
9e5a3c884de6 Initial import of the virtual testbed.
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
12 then while (true); do sleep 10; kill -USR1 $PID; done;
9e5a3c884de6 Initial import of the virtual testbed.
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
13 else kill -USR1 $PID;
9e5a3c884de6 Initial import of the virtual testbed.
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
14 fi
9e5a3c884de6 Initial import of the virtual testbed.
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
15
"Welcome to our mercurial repository"