diff options
Diffstat (limited to 'libeufin/root/etc/rc.d/rc.libeufin-bank.new')
-rw-r--r-- | libeufin/root/etc/rc.d/rc.libeufin-bank.new | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/libeufin/root/etc/rc.d/rc.libeufin-bank.new b/libeufin/root/etc/rc.d/rc.libeufin-bank.new new file mode 100644 index 0000000..d3ba3e1 --- /dev/null +++ b/libeufin/root/etc/rc.d/rc.libeufin-bank.new @@ -0,0 +1,54 @@ +#!/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 + + + + |