32 lines
539 B
Bash
Executable File
32 lines
539 B
Bash
Executable File
#!/bin/sh /etc/rc.common
|
|
# Copyright (c) 2011-2015 OpenWrt.org
|
|
|
|
START=90
|
|
|
|
start(){
|
|
if [ ! -f "/tmp/vlmcsd.pid" ]; then
|
|
/usr/bin/vlmcsd -i /etc/vlmcsd.ini -p /tmp/vlmcsd.pid -L 0.0.0.0:1688
|
|
echo "KMS Server has started."
|
|
else
|
|
echo "KMS Server has already started."
|
|
fi
|
|
}
|
|
|
|
stop(){
|
|
if [ ! -f "/tmp/vlmcsd.pid" ]; then
|
|
echo "KMS Server is not running."
|
|
else
|
|
pid=`cat /tmp/vlmcsd.pid`
|
|
kill $pid
|
|
rm -f /tmp/vlmcsd.pid
|
|
echo "KMS Server has stopped."
|
|
fi
|
|
}
|
|
|
|
restart(){
|
|
stop
|
|
sleep 2
|
|
start
|
|
echo "KMS Server has restarted."
|
|
}
|