* fixed hotplug script (not restarting on "ifup") * fixed init script (not stopping in 1 second) * fixed PKG_MAINTAINER string * removing not needed comments in config file Signed-off-by: Christian Schoenebeck <christian.schoenebeck@gmail.com>
16 lines
456 B
Bash
16 lines
456 B
Bash
#!/bin/sh
|
|
|
|
# only (re-)start on ifup
|
|
[ "$ACTION" = "ifup" ] || exit 0
|
|
|
|
_PID=$(ps | grep '[p]ython.*[r]adicale' 2>/dev/null | awk '{print $1}')
|
|
kill -1 $_PID 2>/dev/null
|
|
if [ $? -eq 0 ]; then
|
|
# only restart if already running
|
|
logger -p user.info -t "radicale[$_PID]" \
|
|
"Restart request due to '$ACTION' of interface '$INTERFACE'"
|
|
/etc/init.d/radicale restart
|
|
else
|
|
# only start if enabled
|
|
/etc/init.d/radicale enabled && /etc/init.d/radicale start
|
|
fi
|