mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-04-12 14:56:53 +02:00
26 lines
554 B
Bash
26 lines
554 B
Bash
#!/sbin/openrc-run
|
|
supervisor="supervise-daemon"
|
|
|
|
# fallback values for /etc/conf.d/msh
|
|
: ${command_user:=msh:msh}
|
|
: ${directory:=/etc/msh}
|
|
: ${logdir:=/var/log/msh}
|
|
|
|
name=msh
|
|
description="Autostart and stop minecraft-server when players join/leave"
|
|
command="/usr/bin/msh"
|
|
command_background=true
|
|
|
|
pidfile="/run/$name.pid"
|
|
output_log="$logdir/output.log"
|
|
error_log="$logdir/error.log"
|
|
|
|
depend() {
|
|
need net
|
|
use logger
|
|
}
|
|
|
|
start_pre() {
|
|
checkpath -d -o "$command_user" "$directory" "$logdir"
|
|
checkpath -f -o "$command_user" "$output_log" "$error_log"
|
|
}
|