-
Notifications
You must be signed in to change notification settings - Fork 0
/
check-alfred
30 lines (22 loc) · 1.01 KB
/
check-alfred
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
#!/bin/bash
# ----------------------------------------------------------------------------
# Pruefung ob alfred laueft, ggf Neustart
# ----------------------------------------------------------------------------
# Skript preuft ob alfred in der Prozesstabelle ist
# falls nein, wird er versucht mit restart auszufuehren
# ----------------------------------------------------------------------------
# little.ben 2015-02-02
# little.ben 2015-10-23: Ergaenzung loeschen alfred.*
# ----------------------------------------------------------------------------
IS_RUN_ALFRED=`ps -ef|grep alfred|grep br-ffwp|awk '{print $10}'`
#IS_RUN_ALFRED=`ps -ef|grep alfred|grep -v grep|awk '{print $10}'`
if [[ "$IS_RUN_ALFRED" == "br-ffwp" ]]; then
echo "check-alfred: alfred laeuft"
#logger "check-alfred: alfred laeuft"
else
echo "check-alfred: alfred laueft NICHT"
logger "check-alfred: alfred laueft NICHT -> restart ausfuehren"
/usr/sbin/service alfred stop
rm /var/run/alfred.*
/usr/sbin/service alfred start
fi