Examples of systemd units that I crafted over time
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Nicolas Massé f7b683f191 add the missing pieces 6 months ago
..
README.md initial commit 6 months ago
backup-mnt-test.service add the missing pieces 6 months ago
common.env initial commit 6 months ago
custom.target initial commit 6 months ago
install.sh initial commit 6 months ago
mnt-backup.mount initial commit 6 months ago
mnt-test.mount initial commit 6 months ago
restore-mnt-test.service add the missing pieces 6 months ago
test.sh initial commit 6 months ago

README.md

Execute a unit before and after another one

Use case

In this example, I wanted to mount a file system (/mnt/test). But before mounting the filesystem, I wanted to make a backup of it. And after, I want to restore the filesystem from the previous backup. In addition to that, the backup is stored on another filesystem that needs to be mounted too.

Install

./install.sh

Test

./test.sh
cat /mnt/test/witness