From cf11d2bbf7e9f4cb8e4b553d634d14bcf4a03094 Mon Sep 17 00:00:00 2001 From: Junior Date: Sat, 23 Nov 2024 15:52:59 +0000 Subject: [PATCH] Add systemd service file for bot --- install/bot-server.service | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 install/bot-server.service diff --git a/install/bot-server.service b/install/bot-server.service new file mode 100644 index 0000000..054c354 --- /dev/null +++ b/install/bot-server.service @@ -0,0 +1,20 @@ +[Unit] +# Set this to something specific for this bot +Description="CircleBot Instance" + +[Service] +ExecStart=/usr/bin/npm start +# Set this to the bot's top level directory +WorkingDirectory=/opt/bots/CircleBot +Restart=always +RestartSec=10 +StandardOutput=journal +StandardError=journal +# Set this to something specific for this bot +SyslogIdentifier=CircleBot +# Set these to the appropriate owner of the bot folders +User=botuser +Group=botuser + +[Install] +WantedBy=multi-user.target