🌻Infrastructure And OperationsSystemd Openrc Cheatsheet
I'm creating a this page because of how frustrated I am with the OpenRC init system.
We use Alpine for a lot of stuff so it's important to know how to use OpenRC init.
description |
systemd command |
openrc command | |
---|---|---|---|
list all services |
|
| |
list enabled services |
|
| |
enable a service |
|
| |
disable a service |
|
| |
start a service |
|
| |
stop a service |
|
| |
stop a service in such a way that it won't start itself up again without asking |
|
| |
get service status |
|
| |
reset crashed service |
??? systemd is perfect, it never crashes 😇 |
| |
where is a service's configuration file at? |
usually |
| |
how to make service configuration file changes take effect |
|
no action required |
|
how to view the logs for a service |
|
check inside the service configuration file (see above). it should have |
|
how to configure environment variables for a service? |
you can use the Environment="var=value" in the service configuration file |
|