Constant Thinking

Posts tagged "scripting"

5 posts
NewMusicSMF.jpg

Home Server Scripting 4: Wrapping DTrace (And Other Scripts) Into SMF Services

Obsolete | In Home Server
| 6 minute read

In the last couple of posts, we used DTrace to notify our media servers and perfected our script a bit.

But the script is still not ready to be used on our home servers yet: It requires manual start and stop, not quite the service oriented automatism we’re used to in the Oracle Solaris world.

The next step is to wrap our DTrace script inside a Service Management Facility (SMF) service, then wrap everything into a shell script that will easily install or remove the service whenever we need it.

NewMusicUpdate

OpenSolaris DTrace for Home Media Servers, Revisited

Obsolete | In Solaris
| 5 minute read

A few weeks ago, we discussed using DTrace for automatically updating media servers when you upload new content.

Yesterday though, I discovered that my D script didn’t work any more. I uploaded new songs to my home server, and expected the music daemon to re-scan the music directory, but nothing happened.

That teached me an important lesson about DTrace, and here’s what I learned:

Package Scripting

OpenSolaris Home Server Scripting 3: Managing Package Repositories

Obsolete | In Home Server
| 6 minute read

OpenSolaris OS comes with the Image Packaging System (IPS) (no link, opensolaris.org no longer exists) for managing installation and additional software. By default, it is configured to pull packages from the /release (no link, opensolaris.org no longer exists) repository, but of course there are many other interesting repositories with software to install from.

Chris Gerhard recommends adding at least the /extras repository (free, registration required (no link, sun.com no longer exists)) so you can easily install VirtualBox, Adobe Flash, TrueType Fonts etc.

If you have a support contract or are an Oracle/Sun employee, you may want to switch your preferred repository to the supported one. The more adventurous may want to switch to the development repository (no link, opensolaris.org no longer exists).

Then, the Software Porting Community on OpenSolaris.org (no link, opensolaris.org no longer exists) has a hierarchical system for making open source software available on OpenSolaris through two repositories: /pending and /contrib.

And then there are a couple of more repositories from user groups, private people, companies offering commercial packages and so on.

One way to register package repositories with the IPS on your home server is by using the package management GUI, or by using the pkg(1) (no link, opensolaris.org no longer exists) command (See also: “How to Add or Update a Publisher (no link, sun.com no longer exists)”).

But of course we want to stick to our “Script Everything” philosophy and write ourselves a small script that takes care of all of our package configuration needs.

Power Management Scripting

OpenSolaris Home Server Scripting 2: Setting Up Power Management

Obsolete | In Home Server
| 9 minute read

Last week, we looked at how essential scripting is for administering home servers (one of the 7 tips for home server bliss) and we wrote us a little script for enabling automatic snapshots.

Another thing that you’ll almost certainly want to do on your OpenSolaris home server is enabling power management. This will ensure your server spends as little power as possible when idle, while still being powerful when needed.

ScriptingHomeserver.jpg

OpenSolaris Home Server Scripting Howto Part One: Intro and a Simple ZFS Auto-Snapshot Enabling Script

Obsolete | In Home Server
| 12 minute read

One of my OpenSolaris Home Server Tips is to script everything. That triggered quite some interest. So let’s start a short series around OpenSolaris home server scripting.

Today, we’ll talk a little bit about the “why?” of home server scripting, then run into a small surprise while we write a small script that will enable/disable the OpenSolaris ZFS Auto-Snapshot Service for us.