From 7dcd6ab37eed8b6e4decaec071a023b276f343fa Mon Sep 17 00:00:00 2001 From: Oleg Silkin Date: Wed, 24 Jul 2019 01:49:46 -0400 Subject: [PATCH] Adds systemd service targets for monitoring --- config/comment-server.target | 8 ++++++++ config/comment-server@.service | 15 +++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 config/comment-server.target create mode 100644 config/comment-server@.service diff --git a/config/comment-server.target b/config/comment-server.target new file mode 100644 index 0000000..afdcc05 --- /dev/null +++ b/config/comment-server.target @@ -0,0 +1,8 @@ +[Unit] +Description="LBRY Comment Server Watchdog" +After=network.target +Requires=comment-server@5921.service comment-server@5922.service comment-server@5923.service comment-server@5924.service + + +[Install] +WantedBy=multi-user.target diff --git a/config/comment-server@.service b/config/comment-server@.service new file mode 100644 index 0000000..e453fe4 --- /dev/null +++ b/config/comment-server@.service @@ -0,0 +1,15 @@ +[Unit] +Description="LBRY Comment Server #%i" +PartOf=comment-server.target + +[Service] +Type=simple +User=oleg +WorkingDirectory=/home/lbry/comment-server/ +ExecStart=/home/lbry/comment-server/venv/bin/commentserv --port %i +Restart=on-failure +KillMode=process + + +[Install] +WantedBy=multi-user.target \ No newline at end of file