You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
406 B
17 lines
406 B
|
2 months ago
|
#!/bin/sh
|
||
|
|
set -eu
|
||
|
|
|
||
|
|
mkdir -p /run/tera-api /run/tera-seriald /var/lib/tera-api
|
||
|
|
chown tera:tera /run/tera-api /run/tera-seriald /var/lib/tera-api
|
||
|
|
|
||
|
|
case "${1:-}" in
|
||
|
|
tera-api|tera-seriald|tera-sessiond|tera-web)
|
||
|
|
daemon="$1"
|
||
|
|
exec su -s /bin/sh tera -c "exec /usr/bin/$daemon"
|
||
|
|
;;
|
||
|
|
*)
|
||
|
|
echo "unsupported Direct Mode service: ${1:-missing}" >&2
|
||
|
|
exit 2
|
||
|
|
;;
|
||
|
|
esac
|