add systemd service template
This commit is contained in:
parent
71e1200319
commit
d8a01f12ea
|
@ -21,3 +21,6 @@ example.com {
|
|||
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`.
|
|
@ -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
|
Loading…
Reference in New Issue