0

I am managing one workstation and think of a maximum of 5 workstations running Ubuntu-based Linux Mint. My own, controlling Computer is also running Mint. What is a good way to queue commands and have them executed when the host comes online?

The following requirements should be met:

  • Add/remove commands from queue when workstation is offline (local queue)
  • output and exit code should be logged or mailed (on my local computer)
  • keep it simple: no big management software or web interfaces

I am already thinking about at. I could transmit the commands to the remote at queue using batch and have them run when the system idles. But I am not sure if the remote atq is persistent when the user suddenly shut's the down the workstation.

Is there a software or best-practise for this?

SiLeX
  • 83
  • 1
  • 4

1 Answers1

1

Your workstations could utilize cron's built-in @reboot attribute -- cron will execute whatever you want during system startup if you put in /etc/crontab line like this:

@reboot            root    /path/to/your/script

The script could copy new to-be-executed commands from a master workstation and then execute them, or merely inform the master workstation that hey, I'm online, please let me know if there's something new for me to do.

Or then the script could just utilize rsync and fetch whatever scripts should be run. Perhaps you could have a dir at your master workstation where you drop the scripts the clients should run? Like /opt/scripts/. The clients would rsync the script dir and then compare from their local log/state file if they need to run some script or not.

Alternatively you could install an actual management software such as Puppet or cfengine, but that's something you voted against. :)

Janne Pikkarainen
  • 31,454
  • 4
  • 56
  • 78
  • Thanks. This does not seem like a robust queue-like system. Sure I could script it by myself and run it (as daemon) on every boot. But I need some ideas on how to do the logic, what tools to use or if there is even software for this. – SiLeX Mar 12 '15 at 12:15