mirror of
https://github.com/kenzok8/small-package
synced 2025-01-08 13:27:36 +08:00
28 lines
435 B
Bash
Executable File
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."
|
|
} |