October 29, 201015 yr Good morning Joe, I followed the description and here is the result: root@Tower:~# ps -ef | grep acpid | grep -v grep root 117 2 0 Oct26 ? 00:00:00 [kacpid] root 1405 1 0 Oct26 ? 00:00:00 /usr/sbin/acpid root@Tower:~# cat /proc/acpi/event button/power PWRF 00000080 00000001 root@Tower:/etc/acpi# grep power /etc/acpi/acpi_handler.sh # tmm - power off via webGui # power) /sbin/init 0 power) /usr/local/sbin/powerdown The last line indicates, that WeeboTech's powerdown package is NOT being used (....which is the only way how I'm able to power down my unRAID server. Any of the running processes e.g. Twonky Media Server do prevent to un-mount the disks and stop the array. I can´t even stop the array via the original menu). Anyhow I have to change the last line power) /sbin/powerdown to: /sbin/powerdown. Am I correct? How to do that to avoid that the change is being lost after the next reboot? It looks like you are installing the powerdown package in the "go" script. If you were installing it through unMENU's package manager it also performs these steps in addition to the installpkg. You are probably doing this already: CTRLALTDEL=yes installpkg /boot/packages/powerdown-1.02-noarch-unRAID.tgz After it you can add these four lines to the end of the "go" script: [ -f /sbin/powerdown ] && mv /usr/local/sbin/powerdown /usr/local/sbin/unraid_powerdown [ -f /sbin/powerdown ] && sed -i "sX/usr/local/sbin/powerdownX/sbin/powerdownX" /etc/acpi/acpi_handler.sh [ ! -f /usr/local/sbin/unraid_powerdown ] && sed -i "sX/sbin/init 0X/sbin/powerdownX" /etc/acpi/acpi_handler.sh sysctl -w kernel.poweroff_cmd=/sbin/powerdown The first renamed the lime-tech supplied "powerdown" command to "unraid_powerdown" The next two edit the acpi_handler.sh script so it will invoke the newly installed powerdown command. The third is only needed if you are running an older version of unRAID where lime-tech did not supply its own powerdown command. The 4th line is so the linux kernel's shutdown will use the new command instead of /sbin/shutdown or /sbin/poweroff Looks like my prior post made it easy to figure out what will happen when you press the power button on your server. Easy, isn't it.. Lots happens when you momentarily press the power button... Joe L.
June 13, 201115 yr Old topic, but i still got a question concerning this. I want to make the dune shut down my server correctly. A person on mpcclub is willing to make a dsf file which can be run from the dune He only needs to know how i launch this powerdown script. My knowledge concerning this is not enough. I just press the case power button, and its triggering somehow the powerdown script. Can you tell me what i need to tell the guy so he knows how i trigger this powerdown script?
May 13, 201214 yr Good morning Joe, I followed the description and here is the result: root@Tower:~# ps -ef | grep acpid | grep -v grep root 117 2 0 Oct26 ? 00:00:00 [kacpid] root 1405 1 0 Oct26 ? 00:00:00 /usr/sbin/acpid root@Tower:~# cat /proc/acpi/event button/power PWRF 00000080 00000001 root@Tower:/etc/acpi# grep power /etc/acpi/acpi_handler.sh # tmm - power off via webGui # power) /sbin/init 0 power) /usr/local/sbin/powerdown The last line indicates, that WeeboTech's powerdown package is NOT being used (....which is the only way how I'm able to power down my unRAID server. Any of the running processes e.g. Twonky Media Server do prevent to un-mount the disks and stop the array. I can´t even stop the array via the original menu). Anyhow I have to change the last line power) /sbin/powerdown to: /sbin/powerdown. Am I correct? How to do that to avoid that the change is being lost after the next reboot? It looks like you are installing the powerdown package in the "go" script. If you were installing it through unMENU's package manager it also performs these steps in addition to the installpkg. You are probably doing this already: CTRLALTDEL=yes installpkg /boot/packages/powerdown-1.02-noarch-unRAID.tgz After it you can add these four lines to the end of the "go" script: [ -f /sbin/powerdown ] && mv /usr/local/sbin/powerdown /usr/local/sbin/unraid_powerdown [ -f /sbin/powerdown ] && sed -i "sX/usr/local/sbin/powerdownX/sbin/powerdownX" /etc/acpi/acpi_handler.sh [ ! -f /usr/local/sbin/unraid_powerdown ] && sed -i "sX/sbin/init 0X/sbin/powerdownX" /etc/acpi/acpi_handler.sh sysctl -w kernel.poweroff_cmd=/sbin/powerdown The first renamed the lime-tech supplied "powerdown" command to "unraid_powerdown" The next two edit the acpi_handler.sh script so it will invoke the newly installed powerdown command. The third is only needed if you are running an older version of unRAID where lime-tech did not supply its own powerdown command. The 4th line is so the linux kernel's shutdown will use the new command instead of /sbin/shutdown or /sbin/poweroff Looks like my prior post made it easy to figure out what will happen when you press the power button on your server. Easy, isn't it.. Lots happens when you momentarily press the power button... Joe L. Thanks for this. Was having the same problem but added your 4 lines to my go script and the power button now shuts down the server.
Archived
This topic is now archived and is closed to further replies.