Manage Runit services with Specinfra
masterSpecinfra provides a module for managing services under the runit init system. This module allows you to check the status, enable/disable, and control the lifecycle (start, stop, restart, reload) of services using standard sv and filesystem operations.
# Note: These methods are part of the Specinfra::Command::Module::Service::Runit module
# and are used to generate shell commands for service management.
# Check if a service is currently running
# Uses: sv status <service> | grep -E '^run: '
# Check if a service is enabled
# Uses: test ! -f /etc/sv/<service>/down
# Enable a service
# Uses: ln -s /etc/sv/<service> /var/service/
# Disable a service
# Uses: rm /var/service/<service>
# Start a service
# Uses: sv up /var/service/<service>
# Stop a service
# Uses: sv down /var/service/<service>
# Restart a service
# Uses: sv restart /var/service/<service>
# Reload a service
# Uses: sv reload /var/service/<service>