From d8a01f12ea806a0c3a58d574103c2a595b9a8d51 Mon Sep 17 00:00:00 2001 From: Hexaitos Date: Wed, 13 Nov 2024 14:36:20 +0100 Subject: [PATCH] add systemd service template --- README.md | 5 ++++- predator_pics.service | 15 +++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 predator_pics.service diff --git a/README.md b/README.md index 2826d6f..5684b2c 100644 --- a/README.md +++ b/README.md @@ -20,4 +20,7 @@ example.com { reverse_proxy :4567 } -``` \ No newline at end of file +``` + +## Autostart +You can use the `predator_pics.service` template and adjust it to your own needs and setup. Afterwards, move it to `/etc/systemd/system` and enable and start it with `(sudo) systemctl enable --now predator_pics`. \ No newline at end of file diff --git a/predator_pics.service b/predator_pics.service new file mode 100644 index 0000000..b5c6ba4 --- /dev/null +++ b/predator_pics.service @@ -0,0 +1,15 @@ +[Unit] +Description=Predator Pics +After=network.target + +[Service] +Type=simple +User=user_here +ExecStart=/usr/bin/ruby /path/to/server.rb +Restart=always +WorkingDirectory=/path/to/server.rb +StandardOutput=journal +StandardError=journal + +[Install] +WantedBy=multi-user.target \ No newline at end of file