mirror of
https://github.com/novatiq/packages.git
synced 2026-04-30 07:28:39 +01:00
radicale: [NEW] Python-based CalDAV/CardDAV Server
Inspired by OpenWrt Ticket System Ticket 9119 Python3 package currently marked as @BROKEN because no time for testing. Signed-off-by: Christian Schoenebeck <christian.schoenebeck@gmail.com>
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
#!/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
|
||||
Reference in New Issue
Block a user