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

export PATH="$PATH:/opt/openslx/sbin:/opt/openslx/bin"

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

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

if [ -d "/mnt/dnbd3" ]; then
	set -- -m /mnt/dnbd3
else
	set --
fi
exec $(which dnbd3-server) -n -c /etc/dnbd3-server "$@"

exit 1