Rev | Line | |
---|
[1374] | 1 | #!/bin/bash |
---|
| 2 | |
---|
| 3 | # Copyright 2012 Georg-August-Universit�t G�ttingen, Germany |
---|
| 4 | # |
---|
| 5 | # Licensed under the Apache License, Version 2.0 (the "License"); |
---|
| 6 | # you may not use this file except in compliance with the License. |
---|
| 7 | # You may obtain a copy of the License at |
---|
| 8 | # |
---|
| 9 | # http://www.apache.org/licenses/LICENSE-2.0 |
---|
| 10 | # |
---|
| 11 | # Unless required by applicable law or agreed to in writing, software |
---|
| 12 | # distributed under the License is distributed on an "AS IS" BASIS, |
---|
| 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
---|
| 14 | # See the License for the specific language governing permissions and |
---|
| 15 | # limitations under the License. |
---|
| 16 | |
---|
| 17 | |
---|
| 18 | |
---|
| 19 | # This script checks if the autoquest-httpmonitor, which is in the same folder as |
---|
| 20 | # this script, is running |
---|
| 21 | |
---|
| 22 | |
---|
| 23 | # Absolute path to this script, e.g. /home/user/bin/stop.sh |
---|
| 24 | SCRIPT=$(readlink -f $0) |
---|
| 25 | |
---|
| 26 | # Find the autoquest-httpmonitor JAR-File and start in the folder of this script |
---|
| 27 | JAR_FILE=`find $(dirname $SCRIPT) -type f -name 'autoquest-httpmonitor-*.jar'` |
---|
| 28 | |
---|
| 29 | # Get the ProcessID of the autoquest-httpmonitor which is in the same folder as this script |
---|
| 30 | PID=$(ps ax | grep "$JAR_FILE" | grep -v ' grep ' | grep ' monitor ' | awk '{print $1}') |
---|
| 31 | |
---|
| 32 | if [ -z "$PID" ]; then |
---|
| 33 | echo "autoquest-httpmonitor is not running" |
---|
| 34 | else |
---|
| 35 | echo "autoquest-httpmonitor is running with PID: $PID" |
---|
| 36 | fi |
---|
| 37 | |
---|
Note: See
TracBrowser
for help on using the repository browser.