Contents of /alx-src/branches/alxconf-060/bin/wfica-launcher.sh
Parent Directory | Revision Log
Revision 5018 -
(show annotations)
(download)
(as text)
Wed Aug 7 12:37:38 2013 UTC (10 years, 8 months ago) by niro
File MIME type: application/x-sh
File size: 331 byte(s)
Wed Aug 7 12:37:38 2013 UTC (10 years, 8 months ago) by niro
File MIME type: application/x-sh
File size: 331 byte(s)
-fixed a typo
1 | #!/bin/bash |
2 | |
3 | sessionfile="$1" |
4 | |
5 | if [[ -z ${sessionfile} ]] |
6 | then |
7 | echo "No sessionfile given." |
8 | exit 1 |
9 | fi |
10 | |
11 | # session already running? prevents massive double-click attacks |
12 | if [[ -z $(ps aux | grep "wf[iI]ca ${sessionfile}") ]] |
13 | then |
14 | nice -n 19 wfica "${sessionfile}" |
15 | else |
16 | echo "Session '${sessionfile}' already running." |
17 | exit 3 |
18 | fi |