Autoshutdown-Plugin

  • Hi!


    I ported a autoshutdown-script (thx chirikai for this) from FreeNAS to Debian/Ubuntu and now made some improvements. Features:

    • Check, if PC is online (via IP)
    • Check, if processes are running (smbd, nfsd, transmission-daemon...)
    • Check, if there are connections on Ports (SSH, FTP, Bittorrent ...
    • ^^^ if not, shutdwon, after a period of time
    • Read actual IP(s) from ifconfig (eth0, eth1, bond0)
    • define a timerange, in which OMV should stay up (whether other PCs are online or not)
    • and many others
    • Fake-Mode to test your settings. With this, OMV does not shutdown, but displays all what it does in the log
    • the script waits 5 min after start (not in Fake-Mode)


    Testers welcome ;) I tried to keep the configuration very small and simple.


    Thx to :arrow: marcelbeck for the GUI, all testers and bug-reporters.


    Please report any issue related to the:
    WebUI here: https://github.com/OMV-Plugins/openmediavault-autoshutdown/
    installation process and the script itself here: https://github.com/OMV-Plugins/autoshutdown/


    Installation:
    OMV:
    Install the Autoshutdown-Plugin from the stable repository: http://packages.omv-plugins.org/ in OMV


    Debian/Ubuntu:
    Use the deb from here. Make sure you install always the latest version.


    For Expert-Settings in the config, please have a look at the included autoshutdown.default (/etc/autoshutdown.default) and the README


    Thx

  • Hello all.
    I’m having some setup errors that I cannot fix myself and could use some advice please.
    In the log file I’m seeing :



    And I Guess this is telling me that I have “'in.tftpd#015'” listed as a configuration option?


    However in the web interface it is set as TEMPPROCNAMES="in.tftpd"in extra options.


    I can leave the extra option TEMPPROCNAMES blank and still would get the warning:

    Code
    openmediavault logger: autoshutdown[27841]: WARN: ' You set it to '#015', which is not a correct syntax.'


    I have looked at the config files in etc/ autoshutdown.* and I do not see the “'#015'” anywhere. So I do not know where its finding that '#015' in the warning.
    I’m doing something wrong?


    Thanks,
    Ack.

  • Please open a CLI (command line) and post the output of

    Code
    cat -v /etc/autoshutdown.conf


    "-v" prints the non-printables characters, maybe we find something then ...
    More Info here

  • Much thanks,



    thats the file. I see the errant "^M" .


    Logic tell me to edit it out. However the file clearly reads "# WARNING: Do not edit this file, your changes will be lost."


    Advise please.


    Thanks.
    Ack.

  • Hi, this is an old thread and the plugin improved a lot in the meantime. But I'm wondering if there is still a deb for newest debain (9.3)? Because the link in the first thread is not working anymore? Or what do I need to use this script on a debian 9.3 server (no OMV).

    • Offizieller Beitrag

    Because the link in the first thread is not working anymore? Or what do I need to use this script on a debian 9.3 server (no OMV).

    The script is in the plugin package. It is tightly integrated with OMV and cannot be used without omv

    omv 7.0.5-1 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.11 | compose 7.1.3 | k8s 7.1.0-3 | cputemp 7.0 | mergerfs 7.0.3


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • Hallo,


    Autoshutdown Version 4.0.3


    es schein aktuell in OMV4 ein Problem mit autoshutdown, bei Überwachung des CPU Loads


    Wenn ich die Zeilen 432 und 435 in der Console ausführe, ist das Ergebnis in CURRENT_LOADAVERAGE_TEMP2 leer.
    Führe ich aber Zeile 434 zeigt sie ein Ergebnis.
    Das führt dazu, dass Zeile 451 Fehler ausgibt im syslog:


    /usr/sbin/autoshutdown.sh: Zeile 451: [: -gt: Einstelliger (unärer) Operator erwartet.


    Und der REchner nicht herunterfährt.


    Jetzt bin ich nicht der sed und awk kenner, um das Lösen zu können.
    Aber ich denke ihr bekommt es hin :D


    Achso, hier noch die Ausgabe von CURRENT_LOADAVERAGE_TEMP1, wo es nich funktioniert


    top - 06:15:58 up 6:47, 2 users, load average: 0,12, 0,14, 0,13


    Gruß
    Sven

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!