Files
Aditya Hase 30d9e6445c feat(volumes): Set MariaDB to depend on mounts when data volumes are used
If MariaDB gets activated, then mounts will be activated as well.
If one of the mounts fails to activate, MariaDB will not be started.
If one of the mounts is explicitly stopped (or restarted), MariaDB will be stopped (or restarted).

If one of the mounts are stopped, MariaDB will be stopped too.

The mounts strictly have to be in active state for MariaDB to also be in active state.
Reference: https://www.freedesktop.org/software/systemd/man/latest/systemd.unit.html#BindsTo=
2024-11-13 13:30:33 +05:30

14 lines
679 B
Plaintext

[Unit]
# If MariaDB gets activated, then mounts will be activated as well.
# If one of the mounts fails to activate, MariaDB will not be started.
# If one of the mounts is explicitly stopped (or restarted), MariaDB will be stopped (or restarted).
# BindsTo imposes a stronger condition than RequiresTo.
# If one of the mounts are stopped, MariaDB will be stopped too.
# When used in conjunction with After
# The mounts strictly have to be in active state for MariaDB to also be in active state.
# Reference: https://www.freedesktop.org/software/systemd/man/latest/systemd.unit.html#BindsTo=
After=etc-mysql.mount var-lib-mysql.mount
BindsTo=etc-mysql.mount var-lib-mysql.mount