Forum

Results 1 to 5 of 5
  1. #1
    Join Date
    October 2017
    Location
    Israel
    Posts
    3

    Script for installing(including crontab) and updating latest TS3 server weekly basis

    Hi guys,

    This is my first post and I've been working on some auto updater in order to preserve my TS server updated.

    As of now the installation script runs only on Ubuntu, but I'll be glad to write one for different distro (Maybe Fedora/CentOS/Redhat)

    Let me know what you think.

    Some explanation:
    1) The script will install the latest version under /home/ts3srv.
    2) On a fresh installation it will create the user ts3srv and will prepare the crontab for futre reboots and updates.
    3) It will log all of the operations in a log file /tmp/TS3_Upgrade.log

    *You may take a look and modify whatever you like in this script either for learning/improvment purposes

    I've attached the file to this thread

    EDIT:

    Added the following to the final installer "TS3-Inst_1.02.sh" :
    1) Added a daemon service instead of starting ts3server as a process via crontab
    2) Server user and location can be modified now
    3) logs and config files will be stored under /var/log/teamspeak/
    4) Updates will be checked every Sunday and Wednesday @ 4:00 O'clock (still WIP as I want to allow changes to this in the future)
    Attached Files Attached Files
    Last edited by Jak0ps; October 24th, 2017 at 08:55 AM.

  2. #2
    Join Date
    December 2012
    Location
    Paris, France
    Posts
    185
    This is a good idea but a bad way to do it.

    1) Your script should ask wich user/path to use

    2) You should ask the user for the delay between two check for update, some users would set 1 day and others 30 for convenience.

    3) The /tmp directory is not intended to store your update log file, and you shoudn't store file anyway, ask the serveradmin password and connect to the server to get his version, platform etc... With that you can dynamicly update the server for all platform.

    4) You should always backup the old server version, the best way to do that is copy the current server into your new destination directory and make the update on the destination directory. So you'll have one directory per server version.

    I hope these comments help you

    - Toine

  3. #3
    Join Date
    February 2012
    Location
    Germany
    Posts
    576
    If you go to automate things, don't waste your time with sophisticated customized scripts to update loose files in the filesystem on the fly.
    Instead, go into packaging the application. Then you are able to install and update the application with with package management of your system. Create scriptlets within the package that stop your server before the update and restart it afterwards, so installing or updating the server is a simple install or update command from within the package manager.

    On Ubuntu, it's apt, as far as I know. Look how and learn to create a *.deb package. Instead of writing an updater as script, write package definition files. That's much more formal and your error margin is much smaller. The real work is not to update the server any more, it is to create the package. 99% of the work is done once you have the package, not when you install it. The risk of something going bad on your productive Teamspeak server during an update is almost nonexistent, because you are able to test your package on a testing system as often as you like, until it is working fine.

    For example, if you rely on directly updating your life server from out of the binary *.tar.bz2 directly from the Teamspeak website means you break your installation as often as Teamspeak decides to shuffle files around in that file or renames executables. All of this happened before.

    And if you did packaging the server, publish the package definition. Not an updater.

  4. #4
    Join Date
    October 2017
    Location
    Israel
    Posts
    3

    Thanks for the feedback guys,I took all of what you said into account

    P.S. I already got a better version (attached)
    Attached Files Attached Files

  5. #5
    Join Date
    October 2017
    Location
    Israel
    Posts
    3
    Quote Originally Posted by Toine View Post
    This is a good idea but a bad way to do it.

    1) Your script should ask wich user/path to use

    2) You should ask the user for the delay between two check for update, some users would set 1 day and others 30 for convenience.

    3) The /tmp directory is not intended to store your update log file, and you shoudn't store file anyway, ask the serveradmin password and connect to the server to get his version, platform etc... With that you can dynamicly update the server for all platform.

    4) You should always backup the old server version, the best way to do that is copy the current server into your new destination directory and make the update on the destination directory. So you'll have one directory per server version.

    I hope these comments help you

    - Toine
    Bullets 1 and 3 has been fixed in this version
    Attached Files Attached Files

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 29
    Last Post: March 10th, 2017, 09:29 AM
  2. Installing latest TeamSpeak 3 Server on Ubuntu 10.04 LTS
    By Sebastian1989101 in forum Linux / FreeBSD
    Replies: 10
    Last Post: February 4th, 2013, 09:09 PM
  3. Gaming Auto Hotkey Script (Including TS)
    By gizmo385 in forum Tools / Web Based
    Replies: 5
    Last Post: December 23rd, 2009, 03:12 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •