summaryrefslogtreecommitdiff
path: root/launch_merchant.sh
blob: 31e5f646eae815ee63ba0a2d1c72077ddeaf713c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/bash

set -eu

ulimit -c unlimited

pids=$(pidof taler-merchant-httpd || true)
if [[ ! -z "$pids" ]]; then
	kill $pids || true
	sleep 1
fi
pids=$(pidof taler-merchant-httpd || true)
if [[ ! -z "$pids" ]]; then
	kill -9 $pids || true
fi

echo launching merchant

cd $HOME

nohup $HOME/local/bin/taler-merchant-httpd -t -c $HOME/merchant.conf | tee $HOME/nohup.merchant.out &
disown

echo "Merchant PID:" $(pgrep -a -U $(whoami) taler-merchant)