Browse Source

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>
lilik-openwrt-22.03
Ondřej Caletka 10 years ago
parent
commit
7c9b5198cd
1 changed files with 6 additions and 2 deletions
  1. +6
    -2
      ipv6/aiccu/files/aiccu.sh

+ 6
- 2
ipv6/aiccu/files/aiccu.sh View File

@ -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…
Cancel
Save