Posts by Dagobert57

    All I can say is that the solution from post # 26 (with corrected path) worked for me.


    I have no more entries in the expert settings and use the "Suspend" entry from the selection menu as a command to shut down. That's how it works. The NAS shuts down fine and there is no longer a red dot. :-)


    However, I wanted to go one step further and switch to the "Suspend-Hybrid" entry, since this will probably not lead to any loss of data in the event of a power failure: https://wiki.archlinux.org/ind…ent#Suspend_and_hibernate


    The log file also says that the kernel supports this. The shutdown command is set to "systemctl hybrid". However, when I enter this command via ssh, I get the error message "Unknown operation hybrid." and nothing happens.


    If, on the other hand, I enter the command "systemctl hybrid-sleep" via ssh (see the above link), it works. Of course, I can also force it with the entry SHUTDOWNCOMMAND = "systemctl hybrid-sleep" in the expert settings.


    But wouldn't it be better if that would also work if you select the appropriate entry?

    Ok I found the bug. You shouldn't do tests when you're supposed to go to bed ...


    I copied the file "autoshutdown-restart" into the directory "/lib" and not into "/lib/systemd/system-sleep", where it should actually go (see your post # 26, I didn't notice it right away) .

    Therefore the sleep code was still there. And then one of the two files was not executable this morning. After I changed that, everything works fine with the version at "https://raw.githubusercontent.com/nrandon/openmediavault-autoshutdown/suspend_test/usr/sbin/autoshutdown".


    Will this then correspond to version 5.1.11 of the plugin? Should I go back to the original version at "https://raw.githubusercontent.com/OpenMediaVault-Plugin-Developers/openmediavault-autoshutdown/master/usr/sbin/autoshutdown" or will this be done automatically as part of the next update?


    Thank you very much for your work and your help!

    I wanted to clarify my post in # 22 again: The change with "sleep 30" meant that after booting the whole thing only worked once. After booting, the point in the dashboard was green and the plugin worked (log file was written), then shutdown automatically after all conditions were met. After waking up, however, the point is red and the plug-in does not work again, nothing is written to the log file either. Not even that the network was not found, absolutely nothing.


    Sorry that my explanation in # 22 may not have been entirely clear.

    I changed the /lib/systemd/system-sleep/autoshutdown-restart as you described it in #20 and deleted the entry in FORCE_NIC. After restarting the machine it worked without any problem (green point in the dashboard). The NAS shut down and restarted, but in the dashboard there is now the well known red point and no logging any more in the logfile of the plugin.


    What else can I do or test?

    I also deleted the spaces as you told me in FORCE_NIC and I had the same problem again as if there was no entry.


    cat /sys/class/net/enp3s0/operstate also says "up". All services (ssh, SMB, ...) work.


    Here is the log output:


    OK, I found the verbose mode for the log, sorry. Here is the part after waking up via WOL (before I forced the NAS to sleep with the command "systemctl suspen"):


    Then I saw that the NAS did not shut down during the night although I made the entry FORCE_NIC = "enp3s0, eth0, eth1" in the expert settings.


    The log file says:



    My IP range includes the IPs 23,26,29,30,31,34,35,201. But so far the NAS had never checked for the address 127.0.0. * only for the area I was using.

    I'm slowly not looking through any more, I claim that this behavior only occurred when I added the entry to FORCE_NIC. After all, this led to the plugin continuing to run but now referring to the IPs in the range 127.0.0. *.

    You are right, chris_km, I changed the option to


    FORCE_NIC="enp3s0, eth0, eth1"


    and it works without a problem. :-)


    By the way, I don't exaxtly know what nrand means with "VERBOSE" but here is the part of the log just before the error occurs:


    Hello everybody,


    me too, I have exactly the same problem. I use OMV 5.5.23-1 and the version of the autoshutdown plugin is also 5.1.9.


    A few days ago (still with version 5.1.7) I noticed that the NAS was not shut down. I haven't changed anything in the configuration. The shutdown only worked again when I entered SHUTDOWNCOMMAND = "systemctl suspend" in the expert settings.


    But then only once, when starting via WOL, the red button for the autoshutdown plugin appeared in the dashboard and the log file read: "No valid network interface found, exiting ..."

    The NAS will then work with all functions, but will no longer shut down.


    I tried both solutions from # 8, but neither worked for me. For me the network card is called "enp3s0".
    I would be very happy if I could get a tip for this.


    Many thanks and best regards