Changeset 260 for tools

Show
Ignore:
Timestamp:
02/13/09 11:31:19 (13 months ago)
Author:
daniel
Message:

changed script line breaks

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • tools/routingservice/trunk/routingservice.sh

    r259 r260  
    1919case $1 in 
    2020        start) 
    21                 echo "\nService starting ..." 
     21 
     22echo " 
     23Service starting ..." 
    2224 
    2325                if [ -e "$pidfile" ]  
    2426                then 
    25                         echo "Service is already running!" 
    26                         echo "Do nothing ... \n[$pidfile]\n\n" 
     27 
     28echo "Service is already running!" 
     29echo "Do nothing ...  
     30[$pidfile] 
     31 
     32" 
    2733                else 
    2834                        $PROGRAM & 
    2935                        PID=$! 
    3036                        echo $PID > "$pidfile" 
    31                         echo "Service started! \n[$pidfile|$PID]\n\n" 
     37 
     38echo "Service started!  
     39[$pidfile|$PID] 
     40 
     41" 
    3242                fi               
    3343        ;; 
    3444         
    3545        restart) 
    36                 echo "\nService restarting ..." 
     46 
     47echo " 
     48Service restarting ..." 
    3749 
    3850                if [ -e "$pidfile" ]  
     
    4153                        kill -9 $pid2kill 
    4254                        rm $pidfile 
    43                         echo "Service stopped!" 
     55 
     56echo "Service stopped!" 
     57 
    4458                else 
    45                         echo "No existing service found ... starting a new one!" 
     59 
     60echo "No running service found ... starting a new one!" 
     61 
    4662                fi 
    4763                 
     
    4965                PID=$! 
    5066                echo $PID > "$pidfile" 
    51                 echo "Service started! \n[$pidfile|$PID]\n\n" 
     67 
     68echo "Service started! 
     69[$pidfile|$PID] 
     70 
     71" 
    5272        ;; 
    5373         
     
    5878                        kill -9 $pid2kill 
    5979                        rm $pidfile 
    60                         echo "\nService stopped! \n[$pid2kill]\n\n" 
     80 
     81echo " 
     82Service stopped! 
     83[$pid2kill] 
     84 
     85" 
    6186                else 
    62                         echo "\nNo service found!\n\n" 
     87echo " 
     88No service found! 
     89 
     90" 
    6391                fi 
    6492        ;; 
     
    6694        debug) 
    6795                # run the program as is 
    68                 echo "\nService starting in DEBUG mode ..." 
    69                 echo "Type CTRL-C to stop the service\n\n" 
     96echo " 
     97Service starting in DEBUG mode ... 
     98Type CTRL-C to stop the service. 
     99 
     100" 
    70101                $PROGRAM 
    71102        ;; 
    72103         
    73104        help) 
    74                 echo "\nThis is the Webrouting Service startup script \n" 
    75                  
    76                 echo "Usage:\n  ./routingservice.sh {start|stop|restart|debug|help} [identifier]\n" 
    77                  
    78                 echo "Commands:" 
    79                 echo "  start       Start the service" 
    80                 echo "  stop        Stop the service" 
    81                 echo "  restart     Stop and immediately start the service again" 
    82                 echo "  debug       Run the service in debug mode" 
    83                 echo "              This will print log messages to the terminal window." 
    84                 echo "  help        Show the startup help\n" 
    85                  
    86                 echo "Optional:" 
    87                 echo "  identifier  Run the service as a distinct process.\n\n" 
     105echo " 
     106This is the Webrouting Service startup script  
     107 
     108Usage: 
     109        ./routingservice.sh {start|stop|restart|debug|help} [identifier] 
     110 
     111Commands: 
     112        start           Start the service 
     113        stop            Stop the service 
     114        restart         Stop and immediately start the service again 
     115        debug           Run the service in debug mode 
     116                        This will print log messages to the terminal window. 
     117        help            Show the startup help 
     118 
     119Optional: 
     120        identifier      Run the service as a distinct process. 
     121 
     122" 
    88123        ;; 
    89124         
    90125        *) 
    91                 echo "\n   Usage: ./routingservice.sh {start|stop|restart|debug|help}\n" 
     126echo " 
     127Usage: ./routingservice.sh {start|stop|restart|debug|help} 
     128 
     129" 
    92130        ;; 
    93131esac