Results 1 to 19 of 19

Thread: Find-A-Drug (Team #2020) Info and Links

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #5
    Senior Member
    Join Date
    Mar 2002
    Location
    MI, U.S.
    Posts
    697
    On Linux, I was a bit confused when I first started FaD. When I ran ./fadsetup, it started ./loader for me (which started ./server and ./think). So for the first few days, every time I rebooted (my biggest processor is in my room, and I can't leave it on 24/7), I was starting ./fadsetup with all the options again.

    You do not need to do this!

    ./fadsetup is only for modifying the current settings of the client. ./loader starts up both ./think and ./server. ./think uses the CPU to do the calculations, and ./server manages the job queue. I believe ./think and ./server communicate with each other over a localhost connection, but I may be mistaken on that.

    So if you want to start it at boot time, you would start up ./loader in one of your bootscripts. My /etc/rc.d/init.d/fad script looks like this:

    Code:
    #!/bin/bash
    
    <pull in various files; you can usually get a skeleton from /etc/rc.d/init.d/template or similar>
    
    case "$1" in
        start)
            su yourusername -c "cd ~/fad && ./loader"
            evaluate_retval
            ;;
        stop)
            killall think server
            evaluate_retval
            ;;
        *)
            echo "Usage: $0 {start|stop}"
            ;;
    esac
    Your distro's boot scripts may require something other than evaluate_retval -- check another bootscript that you have to be sure. Figure out what it does to print out either "OK" or "FAILED" after it tries to start the program.

    (This will work for the Linux From Scratch bootscripts, at least.)

    I use "su yourusername" because I want as few things running as root as possible.

    -----

    I am still trying to find out whether there's a way to "proxy" the connections. I've seen the various posts showing how to share the FaD directory on the server and run it from the client(s), but SMB is horribly broken and NFS is only slightly better, so I don't have any way of sharing the directory between my two machines. I think I remember something about this not being possible, which is too bad. Good thing I don't have a ton of machines.

    -----

    Note also that on Windows, the Cygwin project (www.cygwin.com) has a way to start a command line executable (such as e.g. loader.exe) as a service. It's called cygrunsrv, and is used by (at least) Cygwin-X11 to manage shared memory. But you can hook up any executable to the service entry in the registry -- I used it for the Cygwin sshd on my 2K box at work for a while. Not that sshd worked (something with bad environment variables or some such setting), but the service worked well.

    I think it's also slightly easier to set up than instsrv/srvany, because I don't think there was any registry hacking. I think all I had to do was call cygrunsrv with the right options to install a service for whatever EXE. It installed itself as the service with the appropriate command line options to start the EXE.

    I haven't actually tried this with FaD, though. I should, because then I'd know for sure whether it worked.
    Last edited by bwkaz; 06-12-2005 at 08:16 AM.
    "If you fail to adjust your notion of fairness to the reality of the Universe, you will probably not be happy."

    -- Originally posted by Paratima

Posting Permissions

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