Democratic Underground Latest Greatest Lobby Journals Search Options Help Login
Google

Bash script question.

Printer-friendly format Printer-friendly format
Printer-friendly format Email this thread to a friend
Printer-friendly format Bookmark this thread
Home » Discuss » DU Groups » Computers & Internet » Open Source and Free Software Group Donate to DU
 
alfredo Donating Member (1000+ posts) Send PM | Profile | Ignore Fri Jan-06-06 11:19 PM
Original message
Bash script question.
I have a bash script to start the folding at home (FAH)client. Now I want the FAH client to launch at login. How do I do that.

I am using OSX.

Refresh | 0 Recommendations Printer Friendly | Permalink | Reply | Top
qnr Donating Member (1000+ posts) Send PM | Profile | Ignore Sun Jan-08-06 02:05 PM
Response to Original message
1. You could use cron - or, in my case, I use simpleinit-msb, and I
have a file: /etc/sysconfig/bootmisc -- which is basically just a list of miscellaneous commands that you want run at bootup.

A totally made-up example, but here is how it would look:

#!/bin/sh
dhcpcd eth0
telinit run postfix start
telinit run apache start
modprobe snd_cmipci
telinit run alsa start


I can't really tell you how to set yours up, since I don't know what process control initialization you use.



Now, since your computer doesn't run all the time, you could also use hc-cron (which has more features that assume you power down your computer regularly, in relation to other cron daemons) - and use the @reboot time descriptor when you call your script.
Printer Friendly | Permalink | Reply | Top
 
alfredo Donating Member (1000+ posts) Send PM | Profile | Ignore Sun Jan-08-06 07:14 PM
Response to Reply #1
2. I figured cron would be the way to go. I will try that first.
Edited on Sun Jan-08-06 07:39 PM by alfredo
I just remembered there's an app called CronniX, Screw writing scripts when there is a good freeware app to set it up.

I got it to launch but I will have to change permissions to the FAH5. I get a conflict if I don't sudo.

Printer Friendly | Permalink | Reply | Top
 
qnr Donating Member (1000+ posts) Send PM | Profile | Ignore Sun Jan-08-06 07:48 PM
Response to Reply #2
3. Sounds good, but don't let the bootmisc file throw you. It's not
difficult, it's just a matter of putting what you would type manually to start the F@H client in it.
Printer Friendly | Permalink | Reply | Top
 
alfredo Donating Member (1000+ posts) Send PM | Profile | Ignore Sun Jan-08-06 08:46 PM
Response to Reply #3
4. So I would have to just add sudo.
That way I would still have to type my password, but my terminal would launch, reminding me to launch my client.

Printer Friendly | Permalink | Reply | Top
 
qnr Donating Member (1000+ posts) Send PM | Profile | Ignore Sun Jan-08-06 08:49 PM
Response to Reply #4
5. actually, this comes up at init - so everything in bootmisc assumes it
is being started by the superuser.
Printer Friendly | Permalink | Reply | Top
 
alfredo Donating Member (1000+ posts) Send PM | Profile | Ignore Sun Jan-08-06 09:12 PM
Response to Reply #5
6. I'm finding other issues runing this second FAH client. It is causing
Edited on Sun Jan-08-06 09:14 PM by alfredo
the work unit to reset on the other client. I might have to put the text client on hold for a bit until I figure out what is going on.

Executable: /Volumes/Al/Applications/fah5


<00:31:13> - Ask before connecting: No
<00:31:13> - User name: alfredo (Team 48157)
<00:31:13> - User ID: ###################
<00:31:13> - Machine ID: 2
<00:31:13>
<00:31:13> Loaded queue successfully.
<00:31:13> + Benchmarking ...
<00:31:16>
<00:31:16> + Processing work unit
<00:31:16> Core required: FahCore_65.exe
<00:31:16> Core found.
<00:31:16> Working on Unit 09
<00:31:16> + Working ...
<00:31:16> Folding@Home Client Core Version 2.53 (August 12, 2004)
<00:31:16>
<00:31:16> Proj: work/wudata_09
<00:31:17> Done: 23014 -> 142983 (decompressed 621.2 percent)
<00:31:17> nsteps: 5000000 dt: 2.000000 dt_dump: 250.000000 temperature: 298.000000
<00:31:17> xyzfile:
<00:31:17> " 393 p1136_p1130_L939_K12M_355K
<00:31:17> 1 N -18.263775 31.286360 -27.6718..."
<00:31:17> keyfile:
<00:31:17> "parameters ./proj1136.prm
<00:31:17> NOVERSION
<00:31:17> ARCHIVE
<00:31:17>
<00:31:17> cutoff 16.0
<00:31:17> taper 12..."
<00:31:17>
<00:31:17> - Couldn't get size info for dyn file: work/wudata_09.dyn
<00:31:17> Starting from initial work packet
<00:31:17>
<00:31:17> Protein: p1136_p1130_L939_K12M_355K
<00:31:17> - Run: 212 (Clone 34, Gen 4)
<00:31:17> - Frames Completed: 0, Remaining: 400

<00:31:17> - Dynamic steps required: 5000000
<00:31:17>
<00:31:17> Writing local files:
<00:31:17>
<00:31:17> parameters work/wudata_09.prm
<00:31:17> - Writing "work/wudata_09.key": (overwrite) successful.
<00:31:21> - Writing "work/wudata_09.xyz": (overwrite) successful.
<00:31:21> - Writing "work/wudata_09.prm": (overwrite) successful.
<00:31:25> - Writing "work/wudata_09.key": (append) successful.
<00:31:25>
<00:31:25> PROJECT="work/wudata_09", NSTEPS=5000000, DT=2.0000, DTDUMP=25.000000, TEMP=298.00
<00:31:26> TINKER: Software Tools for Molecular Design
<00:31:26> Version 3.8 October 2000
<00:31:26> Copyright (c) Jay William Ponder 1990-2000
<00:31:26> portions Copyright (c) Michael Shirts 2001
<00:31:26> portions Copyright (c) Vijay S Pande 2001
<01:28:59> Finished a frame (1)

Printer Friendly | Permalink | Reply | Top
 
qnr Donating Member (1000+ posts) Send PM | Profile | Ignore Sun Jan-08-06 09:17 PM
Response to Reply #6
7. I don't run F@H, but the ones I'm used to require that each instance
be run from a seperate directory. If you are just running the same one twice, then the second one is going to overwrite the data from the first one (and then the first one will overwrite the data from the second, etc.)

There are some utilities out there that make it simple, I'm sure there are links at the F@H site. Otherwise, just do up do discrete directories, with a copy of the executable in each, and start each individually.
Printer Friendly | Permalink | Reply | Top
 
alfredo Donating Member (1000+ posts) Send PM | Profile | Ignore Sun Jan-08-06 09:37 PM
Response to Reply #7
8. They are in different directories, in-fact on different drives. I changed
the machine ID on the text client to 2 because the other one, the one that boots first defaults to 1. I am on a dual processor machine.
Printer Friendly | Permalink | Reply | Top
 
qnr Donating Member (1000+ posts) Send PM | Profile | Ignore Sun Jan-08-06 09:39 PM
Response to Reply #8
9. ok, just wanted to make sure you were, indeed, actually calling the
individual executables, and not accidently calling just one of them.
Printer Friendly | Permalink | Reply | Top
 
alfredo Donating Member (1000+ posts) Send PM | Profile | Ignore Sun Jan-08-06 09:53 PM
Response to Reply #9
10. I had an easier time back when I was doing the
distributed folding project. It handled running two clients well.

I might just chuck the text client for now.
Printer Friendly | Permalink | Reply | Top
 
DU AdBot (1000+ posts) Click to send private message to this author Click to view 
this author's profile Click to add 
this author to your buddy list Click to add 
this author to your Ignore list Sun Dec 22nd 2024, 09:14 AM
Response to Original message
Advertisements [?]
 Top

Home » Discuss » DU Groups » Computers & Internet » Open Source and Free Software Group Donate to DU

Powered by DCForum+ Version 1.1 Copyright 1997-2002 DCScripts.com
Software has been extensively modified by the DU administrators


Important Notices: By participating on this discussion board, visitors agree to abide by the rules outlined on our Rules page. Messages posted on the Democratic Underground Discussion Forums are the opinions of the individuals who post them, and do not necessarily represent the opinions of Democratic Underground, LLC.

Home  |  Discussion Forums  |  Journals |  Store  |  Donate

About DU  |  Contact Us  |  Privacy Policy

Got a message for Democratic Underground? Click here to send us a message.

© 2001 - 2011 Democratic Underground, LLC