READ THE RULES
0 Members and 1 Guest are viewing this topic.
#!/bin/bashCLIENTPATH="/serv/greylink/greylink.exe"DISPNUM=":1"WINEPATH=`which wine`XVFBPATH=`which Xvfb`case "$1" in start) echo -n $"Starting: " nohup $XVFBPATH $DISPNUM > Xvfb.log & export DISPLAY=$DISPNUM nohup $WINEPATH $CLIENTPATH > wine.log & echo $"[OK]" ;; stop) echo -n $"Stopping: " nohup killall wine > /dev/null & nohup killall Xvfb > /dev/null & echo $"[OK]" ;; restart) $0 stop $0 start ;; start-debug) echo -n $"Starting in interactive mode: " nohup $XVFBPATH $DISPNUM > Xvfb.log & export DISPLAY=$DISPNUM $WINEPATH $CLIENTPATH $0 stop ;; magnet) echo -n $"Sending magnet: " export DISPLAY=$DISPNUM $WINEPATH $CLIENTPATH /magnet $2 echo $"[OK]" ;; *) echo $"Usage: start|start-debug|stop|restart|magnet" exit 1esacexit 1