07.05.2014, 15:28
(
Последний раз редактировалось JoeMercury; 07.05.2014 в 15:47.
Причина: adding code
)
What is your Linux distro? I am running a test server on Kubuntu 12.04 LTS. All I did was download the linux server and tossed it into a directory. No big issues so far.
BTW you might find this handy, I wrote this bash script to run my server. If you don't use kdialog, you can always replace it with zenity.
BTW you might find this handy, I wrote this bash script to run my server. If you don't use kdialog, you can always replace it with zenity.
Код:
#!/bin/bash
#
server_start() {
#This is where my server is located.
cd "/media/drive_d/samp03"
./samp03svr
}
server_stop() {
killall samp03svr
}
server_restart() {
server_stop
sleep 3
server_start
}
#Menu Dialog Displays Server Active or Not
SampAct=$(ps -A | grep "samp03svr" | grep -v grep | wc -l)
case $SampAct in
0) CmdOpt=`kdialog --radiolist "Server has Stopped" 1 "Start Server" on 2 "Reset Server" off 3 "Kill Server" off`
;;
*) CmdOpt=`kdialog --radiolist "Server is Running" 1 "Start Server" on 2 "Reset Server" off 3 "Kill Server" off`
;;
esac
case $CmdOpt in
1) server_start
;;
2) server_restart
;;
3) server_stop
;;
*) exit
;;
esac

