Category Archives: Linux

linux

Installing TShock Terraria Server on Debian Wheezy

Posted on .

The following is how I installed TShock Terraria Server on a clean Debian Wheezy machine. The same method has been tested working on Ubuntu 12.04 LTS (Precise).

One important difference to other howtos is it does not install mono-complete and the plethora of dependencies that requires (including x11-common). This only installs the required libraries to run, nothing more.

Run these commands individually, this is not to be copy pasted into your shell in full.

Update: A few users are complaining of missing packages, however I have re-run the instructions in a fresh Wheezy guest and found no issues (see transcript of installation here).

Update2: I have successfully tested the following instructions using Ubuntu 12.04 LTS Precise (transcript here)

Update3: Tested working with TShock 4.2

Make sure you are using Debian 7 Wheezy or Ubuntu 12.04 LTS Precise.

Debian init-script

The following init-script can:

  • Connect to the screen console with ./terraria-server connect
  • Exits the server cleanly by issuing the “exit” or “exit-nosave” command to the server console
  • Fits perfectly if installation was made by the above howto

Download
  terraria-init.sh (2.6 KiB, 5,281 hits)

Create md5 checksum files for each sub-directory

Posted on .

This bash script creates checksum files for each subdirectory and the files within.

If the script is run, and there are no changes, then there is no output. This makes it safe to put into a cronjob without fear of getting spammed.

Output can be forced with a “-d” flag.

Requires “md5sum” package to compute checksums.

Syntax:
md5-all-dir.sh [-d] <directory>

Download
  md5-all-dir.sh (4.1 KiB, 2,920 hits)

Continue reading

Disable IPv6 on CentOS6 OpenVZ


In order to disable ipv6, you will have to disable checkpoint/restore (suspend/resume/migrate functionality) as the modules vzrst and vzcpt have ipv6 as a dependancy.

  1. Edit /etc/init.d/vz, find and comment out this line:

    CPT_MODULES="vzcpt vzrst"

  2. Disable ipv6 module by creating /etc/modprobe.d/ipv6-off.conf

    alias net-pf-10 off
    alias ipv6 off

  3. Reboot.

Dovecot Sieve — Deliver mail based on Spamassassin score

Posted on .

I don’t reject any spam e-mail as I want my system to learn from the contents. It gets delivered to a folder and I check it now and then.

However the spam I receieve is beyond rediculous, approaching 400 messages a day. It isn’t feasable for me to check the spam folder for false positives.

The following sieve rule allows me to split the spam into 2 folders based on there Spamassassin score. >=9 “Spam” .. <9 "SpamLikely"

Zabbix Unsupported Items Status

Posted on .

Following on from the zabbix status script, I have put togethor another script to list any unsupported items on agents.

For an item to go unsupported, it usually means something is wrong with the agent, so I add this script to /etc/cron.hourly.

The SQL query to get the list of unsupported items is,

Download
  zabbix-unsupported-status.sh (1.3 KiB, 3,298 hits)