try this: http://www.webattack.com/get/lastchance.shtml
you should be able to write your batch file, hook it to this, and you're done
Is it possible to get windows to run a bat file, before it does anyhting else, whenever the computer is shutdown.
Can you guess what i'm getting at
thats right, i want this bat file to delete foldtrajlite.lock before it does anything else when shutdown is selected.
any ideas, or am i gonna have to write a bat file that removes the foldtrajlite.lock file and then waits, and then shuts down?
The first idea is my prefernece (to run a bat file before doing anything else)
try this: http://www.webattack.com/get/lastchance.shtml
you should be able to write your batch file, hook it to this, and you're done
cheers, it seems to take me to a login screen when i use this though.
Never mind, i'll either stop being lazy and continue right clicking on dfGUI > exit
or write a bat file to delete foldtrajlite.lock and then call the shutdown -s command.
Thanks anyway for such a quick response
Heh, great minds think alike. I just finished adding a startup & shutdown script under Linux to handle starting & stopping my DF clients gracefully.
"So utterly at variance is destiny with all the little plans of men." - H.G. Wells
wont argue with thatOriginally posted by Dyyryath
Heh, great minds think alike. I just finished adding a startup & shutdown script under Linux to handle starting & stopping my DF clients gracefully.
am gonna be installing linux soon so will probably ask for some help in making similar scripts when I do
For running with Windows I sure like running dFold as a service, and it takes care of shutting it down.
Here you go. If your distro uses SysV init (basically, everything except for Slackware does), then put this file into /etc/rc.d/init.d, call it "folding" (or whatever), and symlink to it from the runlevel directories. If that doesn't make any sense, then look for a distro tool (like ksysvinit, or RedHat's service) to set things up for you. The stuff in bold needs to be changed depending on where you installed the DF client to, and which terminal you want to run it on (I use 11, so that Ctrl-Alt-F11, or Alt-F11 if X isn't running, will switch to the DF screen).Originally posted by jonnyw
am gonna be installing linux soon so will probably ask for some help in making similar scripts when I do
Code:#!/bin/sh dfdir=/home/bilbo/distribfold case $1 in start) echo -n "Starting the Distributed Folding client..." cd $dfdir ./foldit </dev/tty11 >/dev/tty11 & if [ $? -eq 0 ] ; then echo " OK" else echo " FAILED" fi ;; stop) echo -n "Stopping the Distributed Folding client..." rm -f $dfdir/foldtrajlite.lock while ps -C foldtrajlite >/dev/null 2>&1 ; do sleep 1 done echo " OK" ;; esac
excellent, cheers for that
all i need know is to get a new hard drive, and linux installed
bwkaz
Your init.d-script works great!
It's the best way to prevent my linux machine running idle after a power outage
the-mk
Uhh, thanks!
I think I've posted it before (or maybe a previous incarnation of it), I just don't remember where those threads would be. Ah well.
I wrote it (well, version 1 of it ) after installing LFS. I needed a way to start it automatically, other than running it from rc.local, which was the way I used to do it in Mandrake. I had just figured out how LFS's init system worked (the "functions" script, and the "evaluate_retval" function, among other things), so mine does look a bit different, but it's effectively the same. I decided it'd be better to make it its own script, for some reason I don't remember at the time (probably because making it separate would let me shut it down). A bit of shell programming later, and it actually worked, go figure.