Providers

These classes implement the translation from user-intended behaviours as specified in the state of the Job class to the system-specific configuration files. At present, there is only an upstart configuration, but similar providers could be defined for systemd, supervisor, launchd, or other systems.

class robot_upstart.providers.Generic(root, job)[source]

Provides only a common constructor for the moment, but as further providers are implemented, may provide a place to store configuration common to them.

Construct a new Provider.

Parameters:
  • root (str) – The filesystem location to prefix all file-install commands with.
  • job (:py:class:robot_upstart.Job) – The job definition to transform to a set of system files.
class robot_upstart.providers.Systemd(root, job)[source]

The Systemd implementation places the user-specified files in /etc/ros/DISTRO/NAME.d, and creates an systemd job configuration in /lib/systemd/system/NAME.d. Two additional helper scripts are created for starting and stopping the job, places in /usr/sbin. To detect which system you’re using run: ps -p1 | grep systemd && echo systemd || echo upstart

Construct a new Provider.

Parameters:
  • root (str) – The filesystem location to prefix all file-install commands with.
  • job (:py:class:robot_upstart.Job) – The job definition to transform to a set of system files.
class robot_upstart.providers.Upstart(root, job)[source]

The Upstart implementation places the user-specified files in /etc/ros/DISTRO/NAME.d, and creates an upstart job configuration in /etc/init/NAME.d. Two additional helper scripts are created for starting and stopping the job, places in /usr/sbin.

Construct a new Provider.

Parameters:
  • root (str) – The filesystem location to prefix all file-install commands with.
  • job (:py:class:robot_upstart.Job) – The job definition to transform to a set of system files.