Autoshutdown & Samba??

  • Hi


    Autoshutdown works great, but i cant use the function Network IP array because my Workstation is 24/7.
    Autoshutdown see the Workstation and doesnt shutdown, but if i dont use this function, my server shutdown although a samba connection is in use!
    How can i change this?

  • Set up Autoshutdown to check for ports. Don't mount you shares as a network drive.


    Your OMV should shutdown in case you no longer access it via smb.


    Greetings
    David

    "Well... lately this forum has become support for everything except omv" [...] "And is like someone is banning Google from their browsers"


    Only two things are infinite, the universe and human stupidity, and I'm not sure about the former.

    Upload Logfile via WebGUI/CLI
    #openmediavault on freenode IRC | German & English | GMT+1
    Absolutely no Support via PM!

  • Sorry, doesn't work for me.
    I have 4 Clients and on 3 there are mounted network drives.
    This works (modified Auto Off from Ubuntu - works very well on my Ubuntu server)
    This searches "no locked" files/directorys with smbstatus:

    Code
    # Samba
    if [ `/usr/bin/smbstatus | grep -i no | grep -i locked | wc -l ` != "1" ]; then
    	  logit "samba connected, auto suspend terminated"
    	  return 1
    fi


    Can you add something like this in your Skript?


    Thanks, Lons

  • Zitat von "lons"

    Sorry, doesn't work for me.
    I have 4 Clients and on 3 there are mounted network drives.


    You cannot mount your smb shares as a network drive, this will prevent autoshutdown from working.


    But maybe solo can add your script...


    Greetings
    David

    "Well... lately this forum has become support for everything except omv" [...] "And is like someone is banning Google from their browsers"


    Only two things are infinite, the universe and human stupidity, and I'm not sure about the former.

    Upload Logfile via WebGUI/CLI
    #openmediavault on freenode IRC | German & English | GMT+1
    Absolutely no Support via PM!

  • I'll test the code-snippet and add it next week. But this makes only sense, if portcheck on 139, 445 is disabled.


    What do you think:
    1. only check locked-files, if port 139,445 is added (makes no sense to me)
    2. always check locked files
    3. separate option to check locked files, but disabled if port 139,445 is enabled.
    4. remove portcheck on 139, 445 and insert check for locked files.


    I'll vote for 3. ;)


    OT: Another ubuntuusers.de-user!


  • I would maybe choose 2 or 3...




    Zitat von "Solo0815"


    OT: Another ubuntuusers.de-user!


    Wer nicht :D


    Greetings
    David

    "Well... lately this forum has become support for everything except omv" [...] "And is like someone is banning Google from their browsers"


    Only two things are infinite, the universe and human stupidity, and I'm not sure about the former.

    Upload Logfile via WebGUI/CLI
    #openmediavault on freenode IRC | German & English | GMT+1
    Absolutely no Support via PM!

  • Is it possible that the plugin checks if the HDD is working? Because I need to connect the Share as network device. But when I'm not accessing it there is no HDD activity, right?! Please correct me if I'm wrong.

  • autoshutdown is checking for smb-connections with "smbstatus" in the coming new version. We are beta-testing right now.


    If your network-device is connected, try this in the CLI

    Code
    /usr/bin/smbstatus | grep -i "no locked"


    and post the output, if there is any. If no output, then Clients are connected and the OMV-Machine doesn't shutdown.

Jetzt mitmachen!

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