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