When doing updates in WordPress, upgrading the WordPress version or the Plug-Ins causes the site to enter into Maintenance Mode. While in Maintenance Mode, a message appears that says “Briefly unavailable for scheduled maintenance. Check back in a minute.” rather than the actual site. Sometimes, especially if you’re using the automatic updating functions, an update might fail and the site may be stuck in Maintenance Mode. WordPress looks at the root level of a directory for some hidden files that can tell a site to operate in a different manner. If there’s a file called “.maintenance” then the site will display the message above. When an update of a Plug-in fails,…
-
-
Configuring Spam Assassin In Mac OS X Lion Server
The built-in message hygiene in Lion Server is provided by Spam Assassin and clamav (amavis). Lion Server’s Server Admin application has an easy-to-use way of configuring some of the more basic settings for Spam Assassin. Spam Assassin’s rules are configured in /etc/mail/spamassassin/local.cf. If you open this into a standard text editor then you can insert blocks that are rules. Each rule has the ability to either locate text within a header (such as an email address), a subject or in the text of an email. To use Spam Assassin to block messages that have the word viagra in them, for example, you would insert the following block: body NO_MORE_VIAGRA /viagra/i…
-
Scripting in Google ChromeOS
I recently got my hands on one of those Google ChromeBooks (Cr-48). Interesting to have an operating system that is just a web browser. But, as anyone likely reading this article already knows, the graphical interface is the web browser and the operating system is still Linux. But what version? Well, let’s go on a journey together. First, you need ChromeOS. If you’ve got a ChromeBook this is a pretty easy thing to get. If not, check http://getchrome.eu/download.php for a USB or optical download that can be run live (or even in a virtual machine). Or, if you know that you’re going to be using a virtual machine, consider a pre-built…
-
Web Site Redirection with html (Lion too)
One of the first things many Apache administrators end up with in their bag of tricks is a piece of code for redirecting a website to another place. 301 redirects are usually better, but a basic redirection page is also very helpful in a number of situations. The following example code can be saved as an index.html page and will redirect traffic from one site to another. A common use of this is to redirect an http site to an https site. In this example, we’ll place this index page in the web directory for https://krypted.com/ on an OS X Lion server. The server runs a site for https://krypted.com/ already…
-
OS X Server: Forcing DNS Propagation
Here I sat, tapping my fingers on the desk, waiting for a DNS change to propagate through a number of secondaries (note to self, I have too many secondary DNS servers at home). While sitting, tapping my fingers I dozed off and dreamt of fishing on the river I grew up on, of the sweet looks my daughter gives me and of retiring into a luddite colony of burning men and women in the desert. When I awoke and wiped the drool from my face, I realized I was wasting my life waiting for DNS to propagate. Then I flushed the cache one more time, just to see if it’s…
-
Aliasing Commands
I find there are a lot of commands I run routinely. Some of which are pretty long strings that are thrown together in order to find what can, at times, be a small piece of information. Or, I might routinely log into a server and want to trim down the command required to do so. Let’s take an example of this in using the open command to vnc into a server. The command to open a server in this fashion would be (assuming a server name of mail.mygroup.mycompany.com, a username of krypted and a password of mypass): open vnc://krypted:mypass@mail.mygroup.mycompany.com For this exercise we’re going to be saving the above command…
-
NTP, OS X, Windows, Cisco and You
At this point, most Mac admins know to how to enable ntp on a Mac OS X Server and set clients to the server. Most Mac admins also know how to use managed preferences to set ntp as well. We all know that time is pretty important and most are using ntp at this point. Network time should, almost by definition, be continuous, which allows ntpd in Mac OS X can update clocks in small denominations. Thus, managing corrections with little overhead or impact to the system enables ntp to be an inexpensive method for managing clocks. But ntp is also built to keep things running smoothly even when there…
-
Using dirname and basename For Paths In Scripts
There are two commands that can be really helpful when scripting operations that involve filenames and paths. The first of these is dirname: dirname can be used to return the directory portion of a path. The second is basename: basename can be used to output the file name portion of a path. For our first example, let’s say that we have an output of /var/db/shadow/hash/850F62CD-966C-43A7-9C66-9F9E6799A955, which we know contains the encrypted password for a given user. To just see the UUID here would be done using the following extremely basic incantation of basename: basename /var/db/shadow/hash/850F62CD-966C-43A7-9C66-9F9E6799A955 Basename can also be used to trim output. For example, let’s say we didn’t need…
-
Converting pst Files to mbox
Large scale mail migrations can be tricky. There is a shareware app that can be used to migrate pst files from the pst format into mbox, which can then be used with Mac OS X http://www.littlemachines.com. If the migration process needs to be automated (they all seem to at scale) then a script could be written to crawl users, finds the pst files and then convert them. Or it could be done on the client side using a self-destructing launchd item. Conversion syntax for libpst would be something like the following: readpst -o /output/folder /server/path/user.pst Before you can use readpst, it needs to be built via libpst on the system that…
-
Customizing vsftpd Banners
vsftpd supports custom welcome banners. By default the vsftpd configuration files are stored in /etc/vsftpd. The main config file is /etc/vsftpd/vsftpd.conf. In this file there are two ways to display a banner. The banner_file parameter will allow you to build nice spiffy banners with multiple lines and paragraphs even (ASCII pr0n if you roll like that): banner_file=/etc/vsftpd/welcome.banner Or for simple setups (most are), the ftpd_banner parameter lets you configure a single line welcome string for unauthenticated users. Make sure this doesn’t wrap to the next line or the daemon won’t start. ftpd_banner=Welcome to krypted.com. The daemon will need to get restarted once changed. The easiest way to do this is to use /etc/init.d/vsftpd:…