rc.taler-merchant.new (837B)
1 #!/bin/sh 2 # 3 # Startup/shutdown script for GNU Taler's exchange. 4 # 5 6 create_run_dir() { 7 if [ ! -d /run/taler/ ]; then 8 mkdir -p /run/taler 9 chown :taler /run/taler 10 chmod g+wX /run/taler 11 fi 12 } 13 14 start() { 15 echo "Starting Taler Merchant" 16 create_run_dir 17 18 daemon \ 19 --name=taler-merchant-httpd \ 20 --user=taler-merchant \ 21 --pidfiles=/run/taler \ 22 --output=/var/log/taler/taler-merchant-httpd.log \ 23 -- taler-merchant-httpd --config /etc/taler/taler.conf 24 } 25 26 stop() { 27 echo "Stopping Taler Merchant" 28 /usr/bin/daemon --name=taler-merchant-httpd --pidfiles=/run/taler --stop 29 } 30 31 status() { 32 /usr/bin/daemon --name=taler-merchant-httpd --pidfiles=/run/taler --running --verbose 33 } 34 35 case "$1" in 36 start) 37 start 38 ;; 39 stop) 40 stop 41 ;; 42 status) 43 status 44 ;; 45 *) 46 echo "Usage: $0 {start|stop|status}" 47 exit 1 48 esac 49 50 51