[PD] Turning on/off an installation

Frank Barknecht fbar at footils.org
Tue Jun 19 16:58:21 CEST 2007

Alexandre Quessy hat gesagt: // Alexandre Quessy wrote:

> I was wondering if someone has an idea on how one could create a
> switch to turn on and off an installation. I was thinking about either
> a push button to turn it off, or a web interface. Maybe one of those
> two things could make Pd (or PHP) write to a file that would be parsed
> by a cron job every minute. That cron job should be owned by root in
> order to be able to halt the computer. Then, to turn it on, I guess
> one could set the bios to turn on the computer automagically when the
> power gets down and then up again... Or one could use the computer
> power button (but in this case, it is an laptop that I want to hide
> deeply...) The whole idea behind this is to avoid to suddenly turn off
> the computer, which would probably corrupt the file system at some
> point. Of course I use GNU/Linux : probably Ubuntu Server or Debian.

You can use the powerbutton actually to savely switch off the
computer, if it has ACPI enabled. On Debian/Ubuntu you should check
what's in /etc/acpi/events/powerbtn This script normally just calls
/etc/acpi/powerbtn.sh which as default calls "/sbin/shutdown -h now"
but you could also put other stuff there. 

In the BIOS of your machine you need to set up that the powerbutton
doesn't immediatly switch off the machine, but only creates that
button event. I think, most modern machines are set up like that
anyways. Just try it! After synching and closing everything of
course. ;) 

 Frank Barknecht                 _ ______footils.org_ __goto10.org__

More information about the Pd-list mailing list