summaryrefslogtreecommitdiffstats
path: root/core/modules/dnbd3-proxy-mode/data/opt/openslx/scripts/systemd-dnbd3_proxy
blob: ad3bf36b8d535964bd52fbf9737e0a82d014b3d0 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/ash

ERRLOG="/run/dnbd3-proxy.err"

if [ -s "$ERRLOG" ]; then
	exec "$(which dnbd3-server)" -n --errormsg "$(cat "$ERRLOG")" -c /etc/dnbd3-server
	exit 1
fi

if [ -d "/mnt/dnbd3" ]; then
	set -- -m /mnt/dnbd3
else
	set --
fi

exec "$(which dnbd3-server)" -n -c /etc/dnbd3-server "$@"

exit 1