aiccu: Issue aiccu stop only when aiccu is running
When AICCU is not running, running 'aiccu stop' results in unnecessary communications with SixXS servers. Signed-off-by: Ondrej Caletka <Ondrej@Caletka.cz>
This commit is contained in:
parent
4f7b0213d9
commit
7c9b5198cd
1 changed files with 6 additions and 2 deletions
|
@ -89,8 +89,12 @@ proto_aiccu_teardown() {
|
|||
local cfg="$1"
|
||||
local link="aiccu-$cfg"
|
||||
CFGFILE="/var/etc/${link}.conf"
|
||||
|
||||
aiccu stop "$CFGFILE"
|
||||
PIDFILE="/var/run/${link}.pid"
|
||||
[ -f "$CFGFILE" -a -f "$PIDFILE" ] && {
|
||||
local pid="$(cat "$PIDFILE")"
|
||||
[ -d /proc/$pid -a $(cat /proc/$pid/comm) = "aiccu" ] && \
|
||||
aiccu stop "$CFGFILE"
|
||||
}
|
||||
}
|
||||
|
||||
proto_aiccu_init_config() {
|
||||
|
|
Loading…
Reference in a new issue