From 1c6e20b274ab3fcc9b96c1ded777320fbb9e19b0 Mon Sep 17 00:00:00 2001 From: aler9 <46489434+aler9@users.noreply.github.com> Date: Wed, 16 Feb 2022 18:50:04 +0100 Subject: [PATCH] add windows service howto (#817) --- README.md | 31 +++++++++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 35bbdcab..b6099ec2 100644 --- a/README.md +++ b/README.md @@ -48,7 +48,9 @@ Features: * [Remuxing, re-encoding, compression](#remuxing-re-encoding-compression) * [Save streams to disk](#save-streams-to-disk) * [On-demand publishing](#on-demand-publishing) - * [Start on boot with systemd](#start-on-boot-with-systemd) + * [Start on boot](#start-on-boot) + * [Linux](#linux) + * [Windows](#windows) * [HTTP API](#http-api) * [Metrics](#metrics) * [pprof](#pprof) @@ -333,7 +335,9 @@ paths: The command inserted into `runOnDemand` will start only when a client requests the path `ondemand`, therefore the file will start streaming only when requested. -### Start on boot with systemd +### Start on boot + +#### Linux Systemd is the service manager used by Ubuntu, Debian and many other Linux distributions, and allows to launch rtsp-simple-server on boot. @@ -364,6 +368,29 @@ sudo systemctl enable rtsp-simple-server sudo systemctl start rtsp-simple-server ``` +#### Windows + +Download the [WinSW v2 executable](https://github.com/winsw/winsw/releases/download/v2.11.0/WinSW-x64.exe) and place it into the same folder of `rtsp-simple-server.exe`. + +In the same folder, create a file named `WinSW-x64.xml` with this content: + +```xml + + rtsp-simple-server + rtsp-simple-server + + %BASE%/rtsp-simple-server.exe + +``` + +Open a terminal, navigate to the folder and run: + +``` +WinSW-x64 install +``` + +The server is now installed as a system service and will start at boot time. + ### HTTP API The server can be queried and controlled with an HTTP API, that must be enabled by setting the `api` parameter in the configuration: