Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/branches/playability/scripts/orxonoxServer.sh @ 10010

Last change on this file since 10010 was 6424, checked in by bensch, 19 years ago

orxonox/trunk: merged the branche network back to the trunk
merged with command:
svn merge https://svn.orxonox.net/orxonox/branches/network . -r 6351:HEAD
no conflicts

  • Property svn:executable set to *
File size: 1.9 KB
Line 
1#!/bin/bash
2##########################################################################
3#   orxonox - the future of 3D-vertical-scrollers                        #
4#                                                                        #
5#   Copyright (C) 2004 orx                                               #
6#                                                                        #
7#   This program is free software; you can redistribute it and/or modify #
8#   it under the terms of the GNU General Public License as published by #
9#   the Free Software Foundation; either version 2, or (at your option)  #
10#   any later version.                                                   #
11#                                                                        #
12#   ### File Specific:                                                   #
13#   main-programmer: Christoph Renner                                    #
14#   co-programmer: ...                                                   #
15#                                                                        #
16#                                                                        #
17#   This script starts an orxonox server and restarts it when it crashes.#
18#   it also creates a logfile for each start                             #
19#                                                                        #
20##########################################################################
21
22
23PORT="9999"
24
25ORXONOXBINARY="./orxonox"
26LOGDIR="/tmp/orxonox_log"
27LOGPREFIX="orxonox"
28SLEEPTIME="5"
29
30ORXONOXOPTIONS=" --dedicated-server $PORT"
31
32while true; do
33        SD=$(date +'%Y-%m-%d-%H:%M:%S');
34        CMDLINE="$ORXONOXBINARY $ORXONOXOPTIONS"
35        LOGFILE="$LOGDIR/$LOGPREFIX-$SD.log"
36        echo $CMDLINE;
37        nice $CMDLINE &> "$LOGFILE";
38
39        echo "Now is $(date +'%Y-%m-%d-%H:%M:%S')" >> "$LOGFILE";
40
41        echo -e "\n\n\nyou have $SLEEPTIME s to kill this script\n\n\n";
42        sleep $SLEEPTIME
43done
44
45
Note: See TracBrowser for help on using the repository browser.