aboutsummaryrefslogtreecommitdiff
path: root/libeufin/root/etc/rc.d/rc.libeufin.new
diff options
context:
space:
mode:
authorSlack Coder <slackcoder@server.ky>2024-10-01 15:31:55 -0500
committerSlack Coder <slackcoder@server.ky>2024-10-07 16:00:42 -0500
commitc983a7f11401015fb845d9d757da619498490ac3 (patch)
treedadb37df23551e9229bdf435e73ac63b713d22da /libeufin/root/etc/rc.d/rc.libeufin.new
parent97baf94615ba2ea028f51d207ea6cc974062c986 (diff)
downloadslackbuilds-c983a7f11401015fb845d9d757da619498490ac3.tar.xz
taler: bump all to 0.13.0
Diffstat (limited to 'libeufin/root/etc/rc.d/rc.libeufin.new')
-rw-r--r--libeufin/root/etc/rc.d/rc.libeufin.new50
1 files changed, 50 insertions, 0 deletions
diff --git a/libeufin/root/etc/rc.d/rc.libeufin.new b/libeufin/root/etc/rc.d/rc.libeufin.new
new file mode 100644
index 0000000..42e9c3e
--- /dev/null
+++ b/libeufin/root/etc/rc.d/rc.libeufin.new
@@ -0,0 +1,50 @@
+#!/bin/sh
+#
+# Startup/shutdown script for GNU Taler's libeufin bank.
+#
+
+export USERPROFILE=/var/lib/libeufin
+
+create_run_dir() {
+ if [ ! -d /run/libeufin-bank/ ]; then
+ mkdir -p /run/libeufin-bank
+ chown libeufin-bank:libeufin-bank /run/libeufin-bank
+ chmod g+wX /run/libeufin-bank
+ fi
+}
+
+start() {
+ echo "Starting Libeufin Bank"
+ create_run_dir
+
+ daemon \
+ --name=libeufin-bank \
+ --user=libeufin-bank \
+ --pidfiles=/run/libeufin-bank \
+ --output=/var/log/taler/libeufin-bank.log \
+ -- libeufin-bank serve --config /etc/libeufin/libeufin-bank.conf
+}
+
+stop() {
+ echo "Stopping Libeufin Bank"
+ /usr/bin/daemon --name=libeufin-bank --pidfiles=/run/libeufin-bank --stop
+}
+
+status() {
+ /usr/bin/daemon --name=libeufin-bank --pidfiles=/run/libeufin-bank --running --verbose
+}
+
+case "$1" in
+start)
+ start
+ ;;
+stop)
+ stop
+ ;;
+status)
+ status
+ ;;
+*)
+ echo "Usage: $0 {start|stop|status}"
+ exit 1
+esac