Thank you, kind sir![]()
they are vary good looking scripts I must admit.
Thank you, kind sir![]()
Well, I think more credit is due to the LFS people for writing the functions file, because I didn't do much with the actual script except plug theirs in and use their functions![]()
Would anyone know how to convert this script to RH8.0 and running F@H? Look up at the top for the actual script.
Nevermind I just used a script from someone on the net... it looks pretty good... Had to copy one file and run one additional command REAL simple!!! If anyone else is interested in the script it can be found here.
hey Ian - i think this would be pretty close assuming you are using FAH3Console-Linux.exe
Code:#!/bin/sh source /etc/init.d/functions FAH="/home/mcdours/fah/FAH3Console-Linux.exe" cd /home/mcdours/fah/ >/dev/null 2>&1 case "$1" in start) echo -n "Starting Folding@Home client ... " su mcdours -c "$FAH >/dev/null 2>&1 &" evaluate_retval ;; stop) echo -n "Stopping Folding@Home's FAH3Console-Linux.exe ... " killproc FAH3Console-Linux.exe ;; restart) $0 stop /usr/bin/sleep 1 $0 start ;; status) statusproc FAH3Console-Linux.exe ;; *) echo "Usage: $0 {start|stop|restart|status}" exit 1 ;; esac
Hows this for size ? Into the archives ....
[quote author=Schotty link=board=22;threadid=3538;start=0#36083 date=1022329163]
Here is my way of automating CLI mode software. I will demo GAH and Audiogalaxy.
First we start the software up at boot time. I use a script to load it a specific way here. I tell /etc/inittab to load it and dump the output to ttys 10,11,12
Next we do the actual scripts.Code:# Audiogalaxy Startup 10:2345:once:/audiogalaxy/init >/dev/tty10 # Genome@Home Client software 11:2345:once:/gah/ghc1/init >/dev/tty11 12:2345:once:/gah/ghc2/init >/dev/tty12
Audioglaxy
GAHCode:#!/bin/sh cd /audiogalaxy ./AGSatellite-static 64.245.58.81 21
Simple eh?Code:#!/bin/sh cd /gah/ghc1 ./ghclient.x
[/quote]
[quote author=redhead link=board=22;threadid=3538;start=0#39126 date=1024952790]
[quote author=Schotty link=board=22;threadid=3538;start=0#39099 date=1024923209]
As for running as a normal user, possibly. Let me look into this.
[/quote]
Something quite simple:
GAH:
[/quote]Code:#!/bin/sh su xyz_user -c "/gah/ghc1/ghclient.x"
If I wanted to make this output everything to tty12 then I would do it like this?
replaced withCode:cd /home/mcdougrs/fah/ >/dev/null 2>&1
and this?Code:cd /home/mcdougrs/fah/ >/dev/tty12
replaced withCode:su mcdougrs -c "$FAH >/dev/null 2>&1 &"
Code:su mcdougrs -c "$FAH >/dev/tty12 &"
Bookmarks