Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19

Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19

Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19

Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19

Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19

Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19

Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19

Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19

Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19

Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19
GAH bootscripts.
Page 1 of 3 123 LastLast
Results 1 to 10 of 30

Thread: GAH bootscripts.

  1. #1

    GAH bootscripts.

    I wrote a bit of a bootscript for GAH... but is there some way I can have it run as a regular user and not root?

  2. #2

    Re: GAH bootscripts.

    Nevermind, I got it sorted. Here's the script, if you want it:

    Code:
    #!/bin/sh
    source /etc/init.d/functions
    GAH="/home/feztaa/gah/ghclient.x"
    cd /home/feztaa/gah/ >/dev/null 2>&1
    case "$1" in
        start)
            echo -n "Starting Genome@Home client ... "
            su feztaa -c "$GAH >/dev/null 2>&1 &"
            evaluate_retval
            ;;
        stop)
            echo -n "Stopping Genome@Home's ghclient.x... "
            killproc ghclient.x
            echo -n "Stopping Genome@Home's filter.x... "
            killproc filter.x
            ;;
        restart)
            $0 stop
            /usr/bin/sleep 1
            $0 start
            ;;
        status)
            statusproc ghclient.x
            statusproc filter.x
            ;;
        *)
            echo "Usage: $0 {start|stop|restart|status}"
            exit 1
            ;;
    esac
    You'll want to change the value of $GAH to be the full path of your ghclient.x binary, and you'll want to change the directory it changes to to be the one where you've got your ghclient.x...

    The /etc/init.d/functions that I sourced is the one that comes with LFS. You can get it here:

    ftp://ftp.linuxfromscratch.org/lfs-b...ts-3.1.tar.bz2 (that also has some extra ones you don't need. just keep the functions file )

  3. #3

    Re: GAH bootscripts.

    Thanks Fezta I was looking for something like this... Now I can added on my boxes... NOW I will kick your but...

  4. #4

    Re: GAH bootscripts.

    Im running debian how can I get debian to run it at startup?

  5. #5

    Re: GAH bootscripts.

    Put both scripts (the one I wrote and 'functions' from LFS) in /etc/init.d

    Then make symlinks to this script in /etc/rc[0-6].d/

    You should read a HOWTO on SysVInit, though, because I don't really feel like explaining the entire concept of bootscripts and how to use them right now.

  6. #6

    Re: GAH bootscripts.

    i put mine in crontab
    Code:
    0 * * * * cd /home/pbharris/ghclient099_linux; ./ghclient.x -nice 19 > /dev/null 2> /dev/null

  7. #7

    Re: GAH bootscripts.

    Why would you do that? You only want to run it once, and at system startup no less. Putting it anywhere but the bootscripts makes no sense

  8. #8

    Re: GAH bootscripts.


    Why would you do that? You only want to run it once, and at system startup no less. Putting it anywhere but the bootscripts makes no sense
    hi fatzza
    it does start within 1 hours of system startup. if there is probalm it will attempt to restart, although this may or may not be successful. looks like both ways work to me. is there anything wrong with running it in a crontab job that you can think of?

  9. #9

    Re: GAH bootscripts.

    Yeah, when you turn on your computer it could take up to an hour for GAH to start

  10. #10

    Re: GAH bootscripts.

    Also, if you need to shutdown or restart GAH, my bootscripts do that perfectly

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
  •