mirror of https://github.com/schoebel/mars
systemd: add basic systemd templates
This commit is contained in:
parent
27b48876a6
commit
345af0b401
|
@ -0,0 +1,9 @@
|
|||
[Unit]
|
||||
Description=MARS auto-activation of primary device /dev/mars/@{res}
|
||||
#Documentation=https://github.com/schoebel/mars/docu/mars-manual.pdf
|
||||
Requires=mars.service
|
||||
After=mars.service
|
||||
|
||||
[Path]
|
||||
PathExists=/dev/mars/@{res}
|
||||
Unit=vol-@escvar{res}.mount
|
|
@ -0,0 +1,14 @@
|
|||
[Unit]
|
||||
Description=MARS systemd trigger from /mars/userspace/emergency-trigger
|
||||
Documentation=https://github.com/schoebel/mars/docu/mars-manual.pdf
|
||||
Requires=mars.service
|
||||
After=mars.service
|
||||
|
||||
[Path]
|
||||
#PathExists=/mars/userspace/emergency-trigger
|
||||
PathChanged=/mars/userspace/emergency-trigger
|
||||
PathModified=/mars/userspace/emergency-trigger
|
||||
Unit=mars-emergency.service
|
||||
|
||||
[Install]
|
||||
WantedBy=mars.service
|
|
@ -0,0 +1,11 @@
|
|||
[Unit]
|
||||
Description=MARS emergency trigger service from /mars/userspace/emergency-trigger
|
||||
Documentation=https://github.com/schoebel/mars/docu/mars-manual.pdf
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
RemainAfterExit=no
|
||||
ExecStart=/usr/bin/marsadm cron
|
||||
|
||||
[Install]
|
||||
WantedBy=mars.service
|
|
@ -0,0 +1,14 @@
|
|||
[Unit]
|
||||
Description=MARS systemd trigger from /mars/userspace/systemd-trigger
|
||||
Documentation=https://github.com/schoebel/mars/docu/mars-manual.pdf
|
||||
Requires=mars.service
|
||||
After=mars.service
|
||||
|
||||
[Path]
|
||||
#PathExists=/mars/userspace/systemd-trigger
|
||||
PathChanged=/mars/userspace/systemd-trigger
|
||||
PathModified=/mars/userspace/systemd-trigger
|
||||
Unit=mars-trigger.service
|
||||
|
||||
[Install]
|
||||
WantedBy=mars.service
|
|
@ -0,0 +1,7 @@
|
|||
[Unit]
|
||||
Description=MARS block layer HA (activation by appearance of /mars/uuid)
|
||||
Documentation=https://github.com/schoebel/mars/docu/mars-manual.pdf
|
||||
|
||||
[Path]
|
||||
PathExists=/mars/uuid
|
||||
Unit=mars.service
|
|
@ -0,0 +1,16 @@
|
|||
[Unit]
|
||||
Description=MARS block layer HA (kernel module)
|
||||
Documentation=https://github.com/schoebel/mars/docu/mars-manual.pdf
|
||||
RequiresMountsFor=/mars/uuid
|
||||
StopWhenUnneeded=false
|
||||
IgnoreOnIsolate=true
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
RemainAfterExit=yes
|
||||
#ExecStartPre=if ! mountpoint /mars; then mount /dev/*/mars /mars; fi
|
||||
ExecStart=/sbin/modprobe mars
|
||||
ExecStop=/sbin/rmmod mars
|
||||
|
||||
[Install]
|
||||
WantedBy=mars.mount
|
|
@ -0,0 +1,16 @@
|
|||
[Unit]
|
||||
Description=MARS local mount on /vol/@{res}
|
||||
#Documentation=https://github.com/schoebel/mars/docu/mars-manual.pdf
|
||||
Requires=mars.service
|
||||
After=mars.service
|
||||
|
||||
ConditionPathIsSymbolicLink=/mars/resource-@{res}/systemd-want
|
||||
ConditionPathExists=/dev/mars/@{res}
|
||||
ConditionPathIsDirectory=/vol/@{res}
|
||||
|
||||
[Mount]
|
||||
What=/dev/mars/@{res}
|
||||
Where=/vol/@{res}
|
||||
|
||||
[Install]
|
||||
WantedBy=mars.service
|
Loading…
Reference in New Issue