While on the subject of system management (I do realize this is a train site , I've also added a number of commands to PyTrain to simplify the management of a PyTrain environment, AKA a bunch of control panels. Those commands are:
- update: checks for PyTrain updates and installs them as necessary
- shutdown: does a clean shutdown of all Pis. On my master control panel, I plan to have a big button that I will press and hold for a few seconds before I plan to power down the layout. Although Pis were designed to just have their power cords pulled out, no piece of electronics really likes this...
- restart: restarts PyTrain on all clients and servers if something is wonky (which means I didn't do my job 😢)
- reboot: reboots all of the Pis and restarts all services
- upgrade: updates the Linux operating system on each Pi, then does a PyTrain update.
All of these commands automatically relaunch PyTrain whether it is running as a system service (preferred) or from a shell window (for developers and layout operators that want to use the PyTrain CLI to control their layout).
-- Dave