Quick build a new Windows PC

Boxstarter offers a way to take a new PC with an internet connection and have it auto load software from a software repository. Here are some sample links I put together. You can view what they do by putting the loaded URL into a browser. The process works without any software loaded only in IE and Edge browsers.

Updated 11/3/2020: build and builddev to include Microsoft Edge and builddev to include Visual Studio Code

Updated 24/4/2023: renamed files and added a game option

http://boxstarter.org/package/nr/url?https://hansenit.solutions/build.txt

http://boxstarter.org/package/nr/url?https://hansenit.solutions/builddev.txt

http://boxstarter.org/package/nr/url?https://hansenit.solutions/buildserver.txt

https://boxstarter.org/package/nr/url?https://hansenit.solutions/buildgame.txt

Services

Hansen IT Solutions can provide a range of services.

Website development and ongoing maintenance

Search engine optimisation

Social media integration and management

SMB Desktop networking design, services and support

Internet connectivity

VoIP Telephony including PABX systems and integration

Custom programming services

Adding slave DNS servers for Plesk

There is a nice and simple extension for Plesk that allows you to setup slave DNS zones from Plesk domains automatically.

If your adding this to an existing server though its a little hit and miss if it will add existing domains. The instructions say you can do this via ‘Apply DNS template’ but this did not work for me. Adding new domains worked fine though.

I ended up writing this script and it worked great.

add-slave.sh
#!/bin/bash
/usr/sbin/rndc -c /usr/local/psa/var/modules/slave-dns-manager/slave_*SLAVEIP*>.conf addzone $1 '{ type slave; file "db.'$1'"; masters { *MASTERIP*; }; };'

Replace *MASTERIP* and *SLAVEIP* with your own server IPs.

Usage from the command line is just needs a the DNS your setting up the slave with as the parameter

Taking it further there was a few hundred domains which didnt seem fun to type in one at a time so I used this script to loop over all the domains and add each one.


#!/bin/sh

ADMIN_PASS=`cat /etc/psa/.psa.shadow`
MYSQL_BIN_D=`grep MYSQL_BIN_D /etc/psa/psa.conf | awk ‘{print $2}’`
mysql=”${MYSQL_BIN_D}/mysql -N -uadmin -p${ADMIN_PASS} psa”

query=”select name from domains;”
domains=`echo $query | $mysql `

for i in ${domains}; do
./add-slave.sh $i
done

from https://gist.github.com/agarzon/37b6eac3f31a5017ffb2 which was linked in the comments.

WHMCS and Plesk 12

If you are having problems, such as randomly not loading pages, running WHMCS on otherwise stock Plesk 12 server, try updating the install of ioncube. It seems the version installed with Plesk is a little older and doesnt quite work right with the current version of WHMCS.

Rsync backup CentOS server with email report

Running various business critical CentOS based Linux servers means good backups are a must. The ability to restore completely from backup to a DR site is a must.

To do this I keep a copy of the server backed up at root level on a locally hosted NAS.

A nightly rsync runs, with appropriate exlucsions that keeps a local copy of the system in sync. Data usage on the various Web/DNS/email servers I run works out to be around 50-200mb a night.

rm -f /var/log/sync/*

rsync -avzh –delete –stats server1.com:/ ย /store/backup/server1/ >/var/log/sync/server1 –exclude={/dev/*,/proc/*,/sys/*,/tmp/*,/run/*,/mnt/*,/media/*,/lost+found,/home/*/.gvfs,usage/*}

tail /var/log/sync/* | mail -s “Server sync report”logs@myemail.com

add a rsync line for each server.

the rsync logs are kept in /var/log/sync. To know if it was a success I can monitor the email. As I’m really only interested in success/fail i use tail to only show me the last few lines of each log.

To restore, do a minimal install of the same CentOS version, install rsync, and rsync directly over root from the backup. Reboot to bring the new system back online as per the last backup.

WordPress Appliance - Powered by TurnKey Linux