Autoshutdown and Teamspeak

  • Good Morning,


    I just installed omv yesterday and I am really happy with it so far but there is a minor problem:
    Is there any way to make autoshutdown stop while someone is connected to the teamspeak server? I added all the teamspeak ports (9987,30033,10011,2010,41144,2008) to the list but it seems if someone is just hanging arround without talking there is no activity on any of those. Other ports (ssh, ftp, PLEX, etc) are recognized and work well.

  • Hmm. This could be difficult because you cannot use any of the current methods to recognize a user within the TS server... I also haven´t found anything like a Teamspeak bot, that could create a PID or just a file which could be checked. I also haven´t found anything the other way around - something like a script that could be run and check if the server is empty... I´m not pretty sure, if this is possible at all.

  • Hmm, for some reason I can not edit via smartphone. I think there is actually some traffic via the voiceport as soon as someone is connected. Autoshutdown just does not recognize it. Maybe because it is so little or maybe because it is udp?

  • You could create a script or ask the dev of the autoshutdown plugin to add it too the plugin.


    Code
    Online=$((         echo open localhost 10011;         sleep 1;         echo "login serveradmin **********";         sleep 1;         echo hostinfo;         sleep 1;         echo "logout";         sleep 1;         echo "quit";         sleep 1;         ) | telnet | grep -o -P '(?<=virtualservers_total_clients_online=).*(?= virtualservers)')


    Online will equal the number of online users or 0 (zero) if no one is connected.


    You can get the needed info from OMV

    Code
    TEAMSPEAK_SERVER_QUERY_PORT=$(omv_config_get '//services/teamspeak3/queryport')
    SERVERADMIN_PASSWORD=$(omv_config_get '//services/teamspeak3/password')

    [align=center]banner@1x.jpg
    What I am watching/watched on my Popcorn Hour media player
    omv 2.1.1 stoneburner | 64 bit | omvextrasorg 1.29
    MySQL (Percona[size=8]) | Newznab | Sonarr | CP | HP | NZBget | YAMJ | CUPS

  • I am a little confused. I am pretty new to linux. Your script works but what do I do with this information? The only idea I currently have is to create a cronjob to run this periodically, write the result to a file and use autoshutdowns plugin function to read it. Or am I making things to complicated?

  • If you want to change the code manually you could add it to /usr/local/bin/autoshutdown.sh just before the return ${CNT}; line.



    Maybe @ryecoaaron can add somthing like it to the plugin.

    [align=center]banner@1x.jpg
    What I am watching/watched on my Popcorn Hour media player
    omv 2.1.1 stoneburner | 64 bit | omvextrasorg 1.29
    MySQL (Percona[size=8]) | Newznab | Sonarr | CP | HP | NZBget | YAMJ | CUPS

  • Miller, there is a setting to kick idle users in TeamSpeak. I think this would be the best way to handle this situation.

    ???


    That´s not what he wants to do.


    He just wants to keep his server from shutting down while anybody is connected to his TS. No matter if the person is idle or not.

  • I did not want to mess with the plugin code as this might be gone every time a new update is released. So I tried my solution. I will write it down, maybe someone will find it useful.


    In /opt/teamspeak3 I created the tscron script:



    and added it to the cronjobs to run once in 10 minutes. Then I just added a autoshutdown plugin in /etc/autoshutdown.d


    Code
    folder="/opt/teamspeak3"
    file="ts.lock"


    Finally I set


    Code
    PLUGINCHECK="true"


    in the expert settings in the autoshutdown GUI.
    It works perfectly fine. As long as someone is connected to the server the ts.lock file will prevent any shutdowns from happening.

  • Good to see you found a solution that suits your needs.

    [align=center]banner@1x.jpg
    What I am watching/watched on my Popcorn Hour media player
    omv 2.1.1 stoneburner | 64 bit | omvextrasorg 1.29
    MySQL (Percona[size=8]) | Newznab | Sonarr | CP | HP | NZBget | YAMJ | CUPS

  • I know this thread is very old, but I have this problem right now. Any way to get this working on newest OMV version and with teamspeak in docker?


    Thanks in advance

Jetzt mitmachen!

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