kenzok8-package/LingTiGameAcc/root/etc/init.d/lingti
github-actions[bot] 98250c90ef update-02.12
2022-02-12 16:05:03 +08:00

28 lines
435 B
Bash
Executable File

#!/bin/sh /etc/rc.common
START=99
[ -d /var/bin ] || mkdir -p /var/bin
[ -f /var/bin/lingti ] || cp /usr/bin/lingti /var/bin/lingti
start() {
state=`pgrep -f "/var/bin/lingti"`
if [ ! -z "$state" ]; then
restart
else
/var/bin/lingti &
fi
echo "LingTiGameAcc Started..."
}
stop() {
kill -9 `pgrep -f "/var/bin/lingti"` 2>/dev/null
echo "LingTiGameAcc Stopped ..."
}
restart() {
stop
sleep 1
start
echo "Restarted."
}