Benutzerinformationen überspringen
Fortgeschrittener
Wohnort: Düsseldorf
Beruf: Fachinformatiker Systemintegration
Rootserver vorhanden: Ja
Quellcode |
|
1 2 3 4 |
./start_script_css5 restart ./start_script_css5: 130: [[: not found Coulnd't find a running Counter-Strike dedicated server Starting Counter-Strike dedicated server: css05 ... done. |
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 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 |
#! /bin/sh # # Start the Counter-Strike dedicated server as non-root. # # A modification of the CS Server startup script, to run the server # as a non-root user. # # ORIGINAL AUTHORS : # # Julien Escario ( pandemik@asylog.net ) # & # Cedric Rochat ( crochat@younics.org ) # # =========================================== # # What you need: # # Linux :) # awk # screen # the hlds_l & cstrike-files OR # a STEAM-installation # # YES, this script works fine with STEAM and CS 1.6 # # How to use: # # Edit the DIR-var to fit your system (just contains the path to the dir that contains hlds_run) # Edit the PARAMS-var to fit your needs # Edit the CS_USER-var to the name of the user that will run the server # # How to see the server-console: # # Just type in: screen -r hlds (or whatever you set $NAME to) # More info about screen can be found by typing "man screen" or using this nice link # http://server.counter-strike.net/server.php?cmd=howto&show=screen # # The easist way is to use this script simple as a start-script for your server # If you want to use it as a script to start the server at boot-time: # # When this is done, copy the file to /etc/rc.d/init.d (or whereever your system stores the # scripts for starting the services # Now you can link the script to your runlevel-dir, here's an example for runlevel 3: # (THIS IS FOR DEBIAN! If you use e.g. Redhat you must change these dirs!!!) # # ln -s /etc/init.d/hlds /etc/rc3.d/S90hlds # ln -s /etc/init.d/hlds /etc/rc6.d/K50hlds # # Or use it manualy like: # /etc/rc.d/init.d/hlds start # /etc/rc.d/init.d/hlds stop # # If you don't want to start the server as root you have to change this: # add the var CS_USER and uncomment it # change the lines at the "start-block" # # You must be logged in as this user to re-attach the screen! # # DOC by jwm (jwm@counter-strike.de) # The user that will run the server CS_USER=MEIN USER # Leave this alone. NAME=css05 PATH=/bin:/usr/bin:/sbin:/usr/sbin # DON'T FORGET TO CHANGE THE PATH TO YOUR NEEDS! DIR=/home/ORDNER/css05/orangebox # Leave this alone. DAEMON=srcds_run # Internet-server: PARAMS="-game cstrike -tos -noipx +map cs_italy -maxplayers 18 +port 31015 +ip 87.118.112.83 -autoupdate -tickrate 100" # Leave this alone. NAME=css05 PATH=/bin:/usr/bin:/sbin:/usr/sbin # DON'T FORGET TO CHANGE THE PATH TO YOUR NEEDS! DIR=/home/ORDNER/css05/orangebox # Leave this alone. DAEMON=srcds_run # Internet-server: PARAMS="-game cstrike -tos -noipx +map cs_italy -maxplayers 18 +port 31015 +ip 87.118.112.83 -autoupdate -tickrate 100" # Leave this alone. DESC="Counter-Strike dedicated server" # Session ID hier eintragen SESSION="css05" case "$1" in start) if [[ `su $CS_USER -c "screen -ls |grep $NAME"` ]] then echo "HLDS is already running!" else echo "Starting $DESC: $NAME" su $CS_USER -c "cd $DIR; screen -m -d -S $SESSION ./$DAEMON $PARAMS" fi ;; stop) if [[ `su $CS_USER -c "screen -ls |grep $NAME"` ]] then echo -n "Stopping $DESC: $NAME" kill `ps aux | grep -v grep | grep -i $CS_USER | grep -i screen | grep -i $NAME | awk '{print $2}'` echo " ... done." else echo "Coulnd't find a running $DESC" fi ;; restart) if [[ `su $CS_USER -c "screen -ls |grep $NAME"` ]] then echo -n "Stopping $DESC: $NAME" kill `ps aux | grep -v grep | grep -i $CS_USER | grep -i screen | grep -i $NAME | awk '{print $2}'` echo " ... done." else echo "Coulnd't find a running $DESC" fi echo -n "Starting $DESC: $NAME" su $CS_USER -c "cd $DIR; screen -m -d -S $SESSION ./$DAEMON $PARAMS" echo " ... done." ;; status) ps aux | grep -v grep | grep hlds_r > /dev/null CHECK=$? [ $CHECK -eq 0 ] && echo "HLDS is UP" || echo "HLDS is DOWN" ;; *) echo "Usage: $0 {start|stop|status|restart}" exit 1 ;; esac exit 0 |
Quellcode |
|
1 |
esac |
Quellcode |
|
1 |
error: Problems detected: insserv: warning: script 'start_script_css3' missing LSB tags and overrides, insserv: warning: script 'start_script_css1' missing LSB tags and overrides, insserv: warning: script 'start_script_css4' missing LSB tags and overrides, insserv: warning: script 'start_script_css6' missing LSB tags and overrides, insserv: warning: script 'start_script_css7' missing LSB tags and overrides, insserv: warning: script 'start_script_css8' missing LSB tags and overrides, insserv: warning: script 'start_script_css2' missing LSB tags and overrides, insserv: warning: script 'start_script_css5' missing LSB tags and overrides, |
Benutzerinformationen überspringen
Administrator
Wohnort: Hagen
Beruf: Mechatroniker (didaktische Systeme)
Rootserver vorhanden: Nein
Quellcode |
|
1 |
#! /bin/sh |
Quellcode |
|
1 |
#!/bin/bash |
Quellcode |
|
1 2 |
dpkg-reconfigure dash #Nein/No auswählen |
Benutzerinformationen überspringen
Fortgeschrittener
Wohnort: Düsseldorf
Beruf: Fachinformatiker Systemintegration
Rootserver vorhanden: Ja