refactor + add openrc

This commit is contained in:
JMARyA 2023-12-07 10:13:45 +01:00
parent 237b3aed3b
commit 3d2c1a5595
Signed by: jmarya
GPG key ID: 901B2ADDF27C2263
4 changed files with 85 additions and 5 deletions

View file

@ -4,4 +4,4 @@ website: https://frigate.video/
---
# Frigate
#wip #🐇
#wip #🐇 #notnow

View file

@ -5,4 +5,4 @@ website: https://www.zigbee2mqtt.io
---
# zigbee2mqtt
#wip #🐇
#wip #🐇 #notnow

View file

@ -4,7 +4,7 @@ obj: os
---
# Alpine Linux
Alpine Linux is a lightweight and secure [Linux](Linux.md) operating system designed for security, simplicity, and resource efficiency. It is particularly popular for use in containerized environments and embedded systems. In this personal knowledge base document, we will explore the key features, benefits, and use cases of Alpine Linux.
Alpine Linux is a lightweight and secure [Linux](Linux.md) operating system designed for security, simplicity, and resource efficiency. It is particularly popular for use in containerized environments and embedded systems. Alpine does not use [Systemd](Systemd.md), instead it uses [openrc](openrc.md).
Here are some of the key features of Alpine Linux:
- Lightweight: Alpine Linux is designed to be as small and simple as possible, with a small footprint and minimal dependencies. The base image is typically around 5 MB in size.
@ -14,7 +14,6 @@ Here are some of the key features of Alpine Linux:
- Container-friendly: Alpine Linux is popular for use in containerized environments due to its small size, low overhead, and focus on security.
## Use Cases
Here are some of the common use cases for Alpine Linux:
- Containerized environments: Alpine Linux is widely used as a base image for containerized applications due to its small size and focus on security.
- Embedded systems: Alpine Linux is popular for use in embedded systems due to its small size and resource efficiency.

View file

@ -7,4 +7,85 @@ source: https://wiki.alpinelinux.org/wiki/OpenRC
---
# openRC
#wip #🐇
OpenRC is a dependency-based init system that works with the system-provided init program
The following commands are available to manage the init system:
- Basics:
```shell
rc-update add <service> <runlevel>
rc-update del <service> <runlevel>
rc-service <service> <start stop restart>
```
- To check services and their set runlevels:
```shell
rc-status
```
## rc-update usage
```
Usage: rc-update [options] add service <runlevel>
rc-update [options] del service <runlevel>
rc-update [options] show
Options: [suChqv]
-s, --stack Stack a runlevel instead of a service
-u, --update Force an update of the dependency tree
-h, --help Display this help output
-C, --nocolor Disable color output
-v, --verbose Run verbosely
-q, --quiet Run quietly
```
## rc-status usage
```
Usage: rc-status [options] [runlevel1] [runlevel2] ...
Options: [aclrsuChqv]
-a, --all Show services from all run levels
-c, --crashed Show crashed services
-l, --list Show list of run levels
-r, --runlevel Show the name of the current runlevel
-s, --servicelist Show service list
-u, --unused Show services not assigned to any runlevel
-h, --help Display this help output
-C, --nocolor Disable color output
-v, --verbose Run verbosely
-q, --quiet Run quietly
```
## rc-service usage
```
Usage: rc-service [options]
Options: [e:ilr:ChqVv]
-e, --exists <arg> tests if the service exists or not
-i, --ifexists if the service exists then run the command
-l, --list list all available services
-r, --resolve <arg> resolve the service name to an init script
-h, --help Display this help output
-C, --nocolor Disable color output
-V, --version Display software version
-v, --verbose Run verbosely
-q, --quiet Run quietly
```
## rc usage
```
Usage: rc [options]
Options: [a:o:s:SChqVv]
-a, --applet <arg> runs the applet specified by the next argument
-o, --override <arg> override the next runlevel to change into
when leaving single user or boot runlevels
-s, --service <arg> runs the service specified with the rest
of the arguments
-S, --sys output the RC system type, if any
-h, --help Display this help output
-C, --nocolor Disable color output
-V, --version Display software version
-v, --verbose Run verbosely
-q, --quiet Run quietly
```