Previous: System Preparation, Up: Using STARTER: From Theory to Practice [Contents]
The rules file is the true heart of your system. This is where your abstract ideas turn into reality: "If it rains, close the shutters", or "If it’s a sunny day, run the irrigation at sunset".
The live rules file is typically installdir/etc/starter/rules.conf (create it on the target host; package installs only rules.conf.example so upgrades never overwrite your production rules). To help you master the STARTER syntax, we’ll use the provided example services. Let’s open the file and write our very first logic block:
beep:status {
SET TRUE WHEN time:hour == 7 && time:minute == 0;
SET FALSE WHEN TRUE;
}
If you now launch starter-core, time-example, and beep-example, you’ve just built an alarm clock that rings every morning at 7:00 for exactly one minute. Simple, right? But let’s look under the hood to see how it actually works.