Moin ich hab folgendes problem hab noch nie nen tf2 server aufgesetzt und schon garnicht bei linux aber server wahr schon am laufen jezz brauche ich noch ein start script
doch ich weis nicht was ich da eintragen muss bzw wass falsch ist
wileicht könnt ihr mir helfen
|
Quellcode
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
|
# replace with the user you created above
SRCDS_USER="sebastian"
# Do not change this path
PATH=/bin:/usr/bin:/sbin:/usr/sbin
# The path to the game you want to host. example = /home/newuser/dod
DIR=/home/sebastian/tf/orangebox
DAEMON=$DIR/srcds_run
# Change all PARAMS to your needs.
PARAMS="-game tf +map cp_badlands"
NAME=SRCDS
DESC="source dedicated server"
case "srcds_run" in
start)
echo "Starting $DESC: $NAME"
if [ -e $DIR ]; then
cd $DIR
su $SRCDS_USER -l -c "screen -d -m -S $NAME $DAEMON $PARAMS"
else
echo "No such directory: $DIR!"
fi
;;
stop)
if screen -ls |grep $NAME; then
echo -n "Stopping $DESC: $NAME"
kill `screen -ls |grep $NAME |awk -F . '{print $1}'|awk '{print $1}'`
echo " ... done."
else
echo "Couldn't find a running $DESC"
fi
;;
restart)
if screen -ls |grep $NAME; then
echo -n "Stopping $DESC: $NAME"
kill `screen -ls |grep $NAME |awk -F . '{print $1}'|awk '{print $1}'`
echo " ... done."
else
echo "Couldn't find a running $DESC"
fi
echo -n "Starting $DESC: $NAME"
cd $DIR
screen -d -m -S $NAME $DAEMON $PARAMS
echo " ... done."
;;
status)
# Check whether there's a "srcds" process
ps aux | grep -v grep | grep srcds_r > /dev/null
CHECK=$?
[ $CHECK -eq 0 ] && echo "SRCDS is UP" || echo "SRCDS is DOWN"
;;
*)
echo "Usage: $0 {start|stop|status|restart}"
exit 1
;;
esac
exit 0
|
beim start komt dan der fehler syntaxfehler beim unerwarteten wort in etc/init.d/srcds zeile 16 case "srcds_run" in
ich weis einfach nich was mir in dem code alles fehlt ich bin echt total neu was so was angeht wileicht kann mir ja jemand helfen das währe nett