Tom Yates – Web developer based in Manchester
Specialising in PHP, HTML, JavaScript, CSS, Yii, Flash, AS3
Show MenuHide Menu

Archives

February 2012
M T W T F S S
« Jan   Mar »
 12345
6789101112
13141516171819
20212223242526
272829  

Syncing cPanel License

February 20, 2012   

/usr/local/cpanel/cpkeyclt

Crontab Syntax

February 16, 2012   

*     *     *   *    *        command to be executed
-     -     -   -    -
|     |     |   |    |
|     |     |   |    +----- day of week (0 - 6) (Sunday=0)
|     |     |   +------- month (1 - 12)
|     |     +--------- day of        month (1 - 31)
|     +----------- hour (0 - 23)
+------------- min (0 - 59)

Other useful syntax:


@reboot      Run once, at startup.
@yearly       Run once a year, "0 0 1 1 *".
@annually    (same as @yearly)
@monthly    Run once a month, "0 0 1 * *".
@weekly     Run once a week, "0 0 * * 0".
@daily        Run once a day, "0 0 * * *".
@midnight   (same as @daily)
@hourly      Run once an hour, "0 * * * *".

Changing Outgoing IP of Mail Server For A Particular Domain in cPanel / Exim

February 16, 2012   

If you are using cPanel, you need to enable “Reference /etc/mailhelo for outgoing SMTP HELO” and “Reference /etc/mailips for outgoing SMTP connections” from the Exim Configuration Editor.

Log into SSH, and edit the file: “/etc/mailhelo” with the helo domains you wish to use:


domain2.tld: domain2.tld
sub.domain2.tld: domain2.tld
addondomain.tld: domain2.tld
other.domain3.tld: other.domain3.tld
*: server1.domain1.tld

Edit the file: “/etc/mailips” with the IPs you wish to use:


domain2.tld: #.#.#.2
sub.domain2.tld: #.#.#.2
addondomain.tld: #.#.#.2
other.domain3.tld: #.#.#.3
*: #.#.#.1

Restart the mail server:


service exim restart

Further reading on Exim settings.

Modifying Glue Record with Nominet’s Web Domain Manager

February 14, 2012   

Nominet unintentionally make it hard to change IP’s / modify glue records in their Web Domain Manager.
For example: if you own the domain sausages.co.uk and you wanted to change the IPs of ns1.sausages.co.uk and ns2.sausages.co.uk you DON’T search for the domain sausages.co.uk and modify it’s nameservers as you would expect. Instead you have to modify the nameservers of any other domain you are not currently using to ns1.sausages.co.uk, ns2.sausages.co.uk and you can you can then edit the nameservers IPs there. Very logical.

Changing Crontab Editor From Vi to Nano/Pico

February 9, 2012   

I hate vi.
I can’t even work out how to exit it without a cheat sheet.
I prefer to use Nano/Pico.

If nano or pico aren’t your default editors you can use the following command to do a one time edit:

EDITOR=nano crontab -e

Or to set it permanently:

export EDITOR=nano

and then you can edit crontab by typing:

crontab -e