Results 1 to 3 of 3

Thread: [SOLVED] Automatically Shutdown on Process End

  1. #1
    Join Date
    Nov 2006
    Location
    India
    Beans
    814

    [SOLVED] Automatically Shutdown on Process End

    Hello People .

    I host a Counter Strike 1.6 Server on my home machine. The server is set up fine and people are playing in the server. I just want to know if its possible to shutdown the system as soon as the server is shutdown.

    I have given admin privileges to a friend who will shut down the server as soon as they are done playing. I want the system to be shut down as soon as the server is killed.

    Thanks.
    The truth is always beautiful, no matter how ugly it might seem at first.

  2. #2
    Join Date
    Jan 2007
    Location
    $here ? $here : $there
    Beans
    3,717
    Distro
    Ubuntu 8.04 Hardy Heron

    Re: Automatically Shutdown on Process End

    You should be able to do that without a problem. One way to do it would be to make a simple script for the server and start it with sudo. Something like this:

    Code:
    #!/bin/bash
    
    su name_of_cs_server_user -c "command_to_start_server"
    shutdown -h now
    If you run that script with sudo, it should run the server as name_of_cs_server_user and it should shutdown the machine as soon as the server ends.
    Don't try to make something "fast" until you are able to quantify "slow".

  3. #3
    Join Date
    Nov 2006
    Location
    India
    Beans
    814

    Re: Automatically Shutdown on Process End

    Thank You.
    The truth is always beautiful, no matter how ugly it might seem at first.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •