New WordPress came out last Friday, Sorry about the delay updating the script. This script will update all instances of wordpress that are not the most current. Run it as root, it will make backups in /root/wp_upgrades of both databases and files in case things go wrong. It will determine if its a WordPress or… Continue reading WordPress Update Script – 2.8.6 and WordPress MU 126.96.36.199
A customer wanting to do basic monitoring , i had a google and found the following script which is very handy. #!/bin/bash # # Script to notify admin user if Linux,FreeBSD load crossed certain limit # It will send an email notification to admin. # # Copyright 2005 (c) nixCraft project # This is free… Continue reading Small Shell Script for monitoring
Need an init script for a Java service? Like tomcat, liferay, or jboss?
Regular Linux init scripts often don't work so well. e.g. Java apps typically want to be run by a particular user (e.g. tomcat or liferay). e.g. They may require a 'special' shutdown mechanism (e.g. with Tomcat sending a signal to a particular port).
So over the years I have had a handy-dandy script that can control most of my most commonly used Java apps (liferay, tomcat, jboss).
It does things like start up the app as a particular user. Checks to ensure the app is responding on a URL before saying it is stared. Waits for the app to shutdown gracefully, else forces it to quit. And provides kill and killstart commands when you're developing and just want the thing restarted!
This morning I updated it to use the lsb logging methods. So the output is a bit prettier than the 'old' echo's we used to use.
The current version of the file will live at http://proj.ri.mu/javainitscript
To use it wget that to the /etc/init.d directory on your server. Then rename (or symlink) it to the service you want to control. Currently the tomcat, liferay and jboss names are supported.
Some excerpts from the script follow...
I thought a useful addition to our blog might be a running series of handy scripts. Just for the sake of things (and because I couldn't find a better title), I'm calling the series "David's Handy Scripts". I'll get this show on the road with a quick script I put together to track 2 things… Continue reading David’s Handy Scripts – bandwidth usage – disk usage
Heres a little Shell Script I wrote which, if run, will check your entire server for insecure versions of wordpress. If it finds any, it will give you the option to upgrade. If you say yes it will backup the existing sites file and database in /root/wp_upgrade and upgrade it. Please Note: This has not… Continue reading WordPress Upgrade Script