3

I need to run a bash script each time a Debian-esque thick client logs off, shuts down, or restarts. Outside of that, it can be any distro, desktop environment, window manager, or otherwise (preferably not Unity or Gnome 3; these are older machines), so long as it can do what I need.

I have already tried Lubuntu 12.04, without any luck.

Beefy_Swain
  • 441
  • 1
  • 5
  • 14

1 Answers1

4

You need to look into run levels, and how upstart ties in with them. This page explains a lot about two of the three stages you are interested in, shutdown and reboot, log off should also just be a simple hook.

NickW
  • 1,089