aboutsummaryrefslogtreecommitdiff
path: root/network/radicale/rc.radicale
diff options
context:
space:
mode:
authorRuben Schuller <code@rbn.im>2022-10-30 14:22:06 +0100
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2022-11-04 14:08:37 +0700
commit35d965dbbacaf187928a16797e5043dfdcbdfe88 (patch)
treea6edb570a5b18b02002c472f49b87ed0989da0da /network/radicale/rc.radicale
parent5538497020f98f177d93942bf6eb2c810a8d85b9 (diff)
network/radicale: Updated for version 3.1.8.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'network/radicale/rc.radicale')
-rwxr-xr-xnetwork/radicale/rc.radicale31
1 files changed, 31 insertions, 0 deletions
diff --git a/network/radicale/rc.radicale b/network/radicale/rc.radicale
new file mode 100755
index 000000000000..3fb0515ec2aa
--- /dev/null
+++ b/network/radicale/rc.radicale
@@ -0,0 +1,31 @@
+#!/bin/sh
+
+# start/stop/restart radicale
+
+radicale_start() {
+ daemon -n radicale -u radicale -o local1.warning -e "HOME=/var/lib/radicale" -D /var/lib/radicale -- python3 -m radicale
+}
+
+radicale_stop() {
+ daemon -n radicale -u radicale --stop
+}
+
+radicale_restart() {
+ radicale_stop
+ sleep 1
+ radicale_start
+}
+
+case "$1" in
+'start')
+ radicale_start
+ ;;
+'stop')
+ radicale_stop
+ ;;
+'restart')
+ radicale_restart
+ ;;
+*)
+ echo "usage $0 start|stop|restart"
+esac