#!/sbin/openrc-run # Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # shellcheck disable=SC2154 command="/opt/softether/bin/vpnserver/vpnserver" command_args="start" description="SoftEther VPN Server" name="SoftEther VPN Server" start_stop_daemon_args="-q" pidfile="/run/softether/${RC_SVCNAME}.pid" depend() { need net } start_post() { pgrep -n "$procname" > "$pidfile" } stop() { ebegin "Stopping $name" start-stop-daemon --stop --quiet --pidfile "$pidfile" -- stop eend $? }