Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
init.d-Script for hddtemp
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
Diggen
n00b
n00b


Joined: 27 Feb 2003
Posts: 17
Location: Germany

PostPosted: Tue Apr 22, 2003 8:03 pm    Post subject: init.d-Script for hddtemp Reply with quote

It's to start up the hddtempd-0.3-beta6(it might work with other versions) so that you can see your hddtemp in gkrellm. I think it's not a big thing and it's not perfect but I've wrote it.

Another thing hddtemp-0.3-beta6 is not in the Portage-Tree so you must download it from http://coredump.free.fr/linux you should also download the new hddtemp-Plugin for gkrellm.

1. First become root

2.
# nano -w /etc/init.d/hddtemp
and paste the code and save it

Code:

#!/sbin/runscript
# Copyrigth 2003 by Benjamin "Diggen" Stark
# Distributed under the terms of the GNU General Public License v2

start() {
   ebegin "Starting hddtemp"
   discs=""
   for i in `dir /dev/discs`
      do
         discs="${discs} /dev/discs/${i}/disc"
      done
   echo "  " `hddtemp $discs`
   start-stop-daemon --start --exec /usr/bin/hddtemp -- -d$discs
   eend $?
}

stop() {
   ebegin "Stoping hddtemp"
   start-stop-daemon --stop --exec /usr/bin/hddtemp
   eend $?
}

restart() {
   svc_stop
   svc_start
}


3. make it executable
# chmod u+x /etc/init.d/hddtemp

and 4. if you wish to let it start up on Boot
# rc-update add hddtemp default


I hope you understand me because my English is not the best.
Back to top
View user's profile Send private message
stahlsau
Guru
Guru


Joined: 09 Jan 2004
Posts: 582
Location: WildWestwoods

PostPosted: Fri Mar 19, 2004 9:38 am    Post subject: Reply with quote

nice one, worked for me. Just had to change from
Quote:
/usr/bin/hddtemp
to
Code:
/usr/sbin/hddtemp

notice the "s" ;-)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum