Folding@Home Init Script

/etc/init.d/fah

#!/bin/sh

PATH=/sbin:/bin:/usr/bin:/opt/fah

. /lib/lsb/init-functions

case "$1" in
  start)
    log_begin_msg "Starting Folding@Home..."
    cd /opt/fah
    nice -n `cat priority 2> /dev/null || echo 0` ./FAH504-Linux.exe > /dev/null 2>&1 &
    log_end_msg $?
  ;;
  stop)
    log_begin_msg "Shutting Down Folding@Home..."
    killall FAH504-Linux.exe > /dev/null 2>&1
    log_end_msg $?
  ;;
  *)
    log_success_msg "Usage: /etc/init.d/fah {start|stop}"
    exit 1
  ;;
esac

exit 0

4 Responses to “Folding@Home Init Script”

  1. [...] I meant to post this ages ago, but things get lost and forgotten, I setup my server [sandman] to run Folding@Home to make use of its mass of wasted CPU cycles. I downloaded the Linux version and extracted it under /opt/fah/, I also created an init script to start Folding@Home at boot time. [...]

  2. [...] I noticed my server was taking a while to respond to requests sometimes so, I altered the Folding@Home init script to set the sheduling priority based on the contents of /opt/fah/priority, or silently default to 0. [...]

  3. [...] my server was taking a while to respond to requests sometimes so, I altered the Folding@Home init script to set the sheduling priority based on the contents of /opt/fah/priority, or silently default to [...]

  4. [...] CPU cycles. I downloaded the Linux version and extracted it under /opt/fah/, I also created an init script to start Folding@Home at boot [...]

Leave a Reply