aboutsummaryrefslogtreecommitdiff
path: root/taler-merchant/root/etc/rc.d/rc.taler-merchant.new
diff options
context:
space:
mode:
Diffstat (limited to 'taler-merchant/root/etc/rc.d/rc.taler-merchant.new')
-rwxr-xr-xtaler-merchant/root/etc/rc.d/rc.taler-merchant.new51
1 files changed, 51 insertions, 0 deletions
diff --git a/taler-merchant/root/etc/rc.d/rc.taler-merchant.new b/taler-merchant/root/etc/rc.d/rc.taler-merchant.new
new file mode 100755
index 0000000..cf6c783
--- /dev/null
+++ b/taler-merchant/root/etc/rc.d/rc.taler-merchant.new
@@ -0,0 +1,51 @@
+#!/bin/sh
+#
+# Startup/shutdown script for GNU Taler's exchange.
+#
+
+create_run_dir() {
+ if [ ! -d /run/taler/ ]; then
+ mkdir -p /run/taler
+ chown :taler /run/taler
+ chmod g+wX /run/taler
+ fi
+}
+
+start() {
+ echo "Starting Taler Merchant"
+ create_run_dir
+
+ daemon \
+ --name=taler-merchant-httpd \
+ --user=taler-merchant \
+ --pidfiles=/run/taler \
+ --output=/var/log/taler/taler-merchant-httpd.log \
+ -- taler-merchant-httpd --config /etc/taler/taler.conf
+}
+
+stop() {
+ echo "Stopping Taler Merchant"
+ /usr/bin/daemon --name=taler-merchant-httpd --pidfiles=/run/taler --stop
+}
+
+status() {
+ /usr/bin/daemon --name=taler-merchant-httpd --pidfiles=/run/taler --running --verbose
+}
+
+case "$1" in
+start)
+ start
+ ;;
+stop)
+ stop
+ ;;
+status)
+ status
+ ;;
+*)
+ echo "Usage: $0 {start|stop|status}"
+ exit 1
+esac
+
+
+