add systemd service template

This commit is contained in:
Hexaitos 2024-11-13 14:36:20 +01:00
parent 71e1200319
commit d8a01f12ea
2 changed files with 19 additions and 1 deletions

View File

@ -21,3 +21,6 @@ example.com {
reverse_proxy :4567 reverse_proxy :4567
} }
``` ```
## 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`.

15
predator_pics.service Normal file
View File

@ -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