From 15ce3671ac19b599dc11e68b5585a6fd50a09099 Mon Sep 17 00:00:00 2001 From: Troy Ihmels <82420648+t-ihmels@users.noreply.github.com> Date: Fri, 7 Nov 2025 12:13:44 -0800 Subject: [PATCH] update documentation Co-authored-by: aler9 <46489434+aler9@users.noreply.github.com> --- docs/2-usage/17-start-on-boot.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/docs/2-usage/17-start-on-boot.md b/docs/2-usage/17-start-on-boot.md index f8730ec2..f64cf32e 100644 --- a/docs/2-usage/17-start-on-boot.md +++ b/docs/2-usage/17-start-on-boot.md @@ -16,7 +16,8 @@ Create a _systemd_ service: ```sh sudo tee /etc/systemd/system/mediamtx.service >/dev/null << EOF [Unit] -Wants=network.target +After=network-online.target +Wants=network-online.target [Service] ExecStart=/usr/local/bin/mediamtx /usr/local/etc/mediamtx.yml [Install] @@ -24,6 +25,12 @@ WantedBy=multi-user.target EOF ``` +Enable a _wait-online_ service to make sure that _MediaMTX_ is started after network has been properly initialized: + +```sh +sudo systemctl enable systemd-networkd-wait-online.service +``` + If SELinux is enabled (for instance in case of RedHat, Rocky, CentOS++), add correct security context: ```sh