mirror of
https://github.com/tiyn/wiki.git
synced 2025-04-10 02:27:45 +02:00
Compare commits
3 Commits
7730a31c82
...
01aee89e94
Author | SHA1 | Date | |
---|---|---|---|
01aee89e94 | |||
076528b48b | |||
aad5b725c9 |
@ -93,3 +93,14 @@ Finally run:
|
|||||||
Reboot the system with `reboot`.
|
Reboot the system with `reboot`.
|
||||||
Make sure the USB key for decryption is plugged in.
|
Make sure the USB key for decryption is plugged in.
|
||||||
If so the encrypted partition should be decrypted automatically.
|
If so the encrypted partition should be decrypted automatically.
|
||||||
|
|
||||||
|
## Unlock an encrypted device with the USB key created in the previous section
|
||||||
|
|
||||||
|
With the following command an encrypted device can be decrypted with the usb
|
||||||
|
stick created in the previous section.
|
||||||
|
Make sure to edit `--key-file`, `--keyfile-offset` and `--keyfile-size` to
|
||||||
|
match the settings used in the creation of the USB key.
|
||||||
|
|
||||||
|
```sh
|
||||||
|
cryptsetup luksOpen /dev/sda2 crypt-volume --key-file=/dev/usbkey --keyfile-offset=14848 --keyfile-size=2048
|
||||||
|
```
|
||||||
|
30
wiki/linux/systemd.md
Normal file
30
wiki/linux/systemd.md
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
# SystemD
|
||||||
|
|
||||||
|
SystemD is a software suit for system components for Linux systems.
|
||||||
|
It is mainly used for service configuration.
|
||||||
|
|
||||||
|
## Run command on boot
|
||||||
|
|
||||||
|
To run a command (in this case `/bin/bash /root/run.sh`) create the following
|
||||||
|
file at `/etc/systemd/system/` with a name ending on `.service`.
|
||||||
|
In this case it is called `unturned.service`.
|
||||||
|
|
||||||
|
```txt
|
||||||
|
[Unit]
|
||||||
|
Description=Description of the service
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
ExecStart=/bin/bash /root/run.sh
|
||||||
|
Type=simple
|
||||||
|
```
|
||||||
|
|
||||||
|
For [Proxmox](./proxmox.md) you can add the following line under the `[Unit]`
|
||||||
|
section to make sure the service is started after Proxmox has finished
|
||||||
|
initializing.
|
||||||
|
|
||||||
|
```txt
|
||||||
|
After=pve-guests.service
|
||||||
|
```
|
Loading…
x
Reference in New Issue
Block a user