Results 1 to 2 of 2

Thread: Perl Page To Maintain a game server?!?

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Nov 2001
    Location
    Cheshire, England
    Posts
    116

    Perl Page To Maintain a game server?!?

    i just bought a web server that runs on linux and decided to run a Counterstrike game server off of it, however if i wanna update the server and it needs to be restarted, i have to login to SSH and type a load of stuff which i dont even know what any of it means, so could someone give me some advice/help on creating a web page that restarts/quits/starts the server

    i've been told it can be done using perl ... but do i know anything bout perl? ... NO

    any help will be appreciated greatly

    thx

    also some of the main things that the server is running are here

    Apache
    Proftpd
    Bind
    SSH
    Real Server
    ShoutCast Server
    Half-Life: Counter-Strike Server
    --- Counter-Terrorists Win ---

    http://manix.pax3k.co.uk
    www.manix-creations.net

  2. #2
    Hyperactive Member progressive's Avatar
    Join Date
    Sep 2001
    Location
    Manchester, UK
    Posts
    404
    Well I don't know about stoping and restarting a game server, but if you wanted to restart Apache web server you'd do something like.
    Code:
    #!/usr/bin/perl
    
    `/usr/local/apache/bin/apachectl graceful`;
    basically whatever is enclosed within the `` (these are back ticks not single quotes' ')
    is run on the command line, so you could put together a little perl script
    such as:-
    Code:
    #!/usr/bin/perl
    
    `stop my server`;
    `start my server`;
    print "all done...lets have more fun";
    To add this functionality to a web page is a little more involved and not recommended unless the page is password protected otherwise anyone could stop and start your server.
    google for htaccess to learn about password protecting websites.

    Anything else gis a shout !

Posting Permissions

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



Click Here to Expand Forum to Full Width