# Canonical example unit for BaseRunnerMulti.py - see docs/BaseRunnerMulti.md's # "Deployment" section for the copy/daemon-reload/enable/start sequence. # Adjust paths if this host's checkout doesn't live at /usr/local/basestation3. [Unit] Description=Consolidated multi-site glider account runner After=network.target baserunnerprivexec.service # Wants=, not Requires=: still pulls baserunnerprivexec.service in and # orders this unit's start after it (see After= above), but - unlike # Requires= - does NOT stop this unit whenever baserunnerprivexec.service # is stopped or restarted (e.g. to pick up a sites.yaml/cgroup edit, or a # unit-file change - see "Installing the units" below). This unit's own # dispatch-failure requeue (Dispatcher._dispatch_one_queued) already # absorbs the helper being briefly unreachable during that restart, so # there's nothing to gain from also taking this unit down - Requires= # previously did exactly that, silently, since Requires= propagates a # stop to units that declare it, not only a start. Wants=baserunnerprivexec.service [Service] User=baserunner Group=baserunner # baserunner has no home directory (--no-create-home), so matplotlib's # default $HOME/.config/matplotlib cache dir isn't writable; it falls # back to a throwaway /tmp dir with a startup warning if left unset. CacheDirectory=baserunner Environment=MPLCONFIGDIR=/var/cache/baserunner ExecStart=/opt/basestation/bin/python /usr/local/basestation3/BaseRunnerMulti.py \ --sites_config /usr/local/basestation3/etc/sites.yaml \ --priv_exec_socket /run/baserunner/priv_exec.sock \ --base_log /var/log/baserunner/baserunnermulti.log # Creates /var/log/baserunner/ owned baserunner:baserunner (mode 0750) on # every start, recreating it if it's ever missing - no manual mkdir/chown # of the log directory needed. Requires systemd >= 235. LogsDirectory=baserunner WatchdogSec=30 Restart=always Type=notify [Install] WantedBy=multi-user.target