From 3f04c1cff1b8c251638512e894c4865201a79cf4 Mon Sep 17 00:00:00 2001 From: Vitor Luis Date: Wed, 13 Mar 2019 19:01:31 +0100 Subject: [PATCH 1/3] Create bitbot.service Systemd script to use with Ubuntu 18.04 LTS (tested) or similar. --- bitbot.service | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 bitbot.service diff --git a/bitbot.service b/bitbot.service new file mode 100644 index 00000000..0640fac7 --- /dev/null +++ b/bitbot.service @@ -0,0 +1,20 @@ +# This systemd script was made to be used in Ubuntu 18.04 LTS +# Check your distro docs and make the appropriate changes if needed + +[Unit] +Description=BitBot Service +Wants=network-online.target +After=network-online.target + +[Service] +User=$USER +Group=$GROUP +WorkingDirectory=/home/$USER/bitbot +ExecStart=/usr/bin/python3 start.py +ExecReload=/bin/kill -HUP $MAINPID +Restart=always + +[Install] +WantedBy=multi-user.target + +# Remember to change $USER and $GROUP with your actual shell username From ae8f90d05272d4f3b9960cd5f989d90d1e8fc6cf Mon Sep 17 00:00:00 2001 From: Vitor Luis Date: Wed, 13 Mar 2019 19:22:59 +0100 Subject: [PATCH 2/3] Final location of bitbot.service systemd script Moved the systemd script to `/docs/bitbot.service` as suggested here: https://github.com/jesopo/bitbot/pull/48#issuecomment-472541794 Need to delete the one in the root folder. --- docs/bitbot.service | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 docs/bitbot.service diff --git a/docs/bitbot.service b/docs/bitbot.service new file mode 100644 index 00000000..1bd18ef5 --- /dev/null +++ b/docs/bitbot.service @@ -0,0 +1,20 @@ +# This systemd script was made to be used in Ubuntu 18.04 LTS +# Check your distro and make the appropriate changes if needed + +[Unit] +Description=BitBot Service +Wants=network-online.target +After=network-online.target + +[Service] +User=$USER +Group=$GROUP +WorkingDirectory=/home/$USER/bitbot +ExecStart=/usr/bin/env python3 start.py +ExecReload=/bin/kill -HUP $MAINPID +Restart=always + +[Install] +WantedBy=multi-user.target + +# Remember to change $USER and $GROUP with your actual shell username From e6cc9c8e69e7f4349b16ebedd10f9f630703f68a Mon Sep 17 00:00:00 2001 From: Vitor Luis Date: Wed, 13 Mar 2019 19:25:42 +0100 Subject: [PATCH 3/3] Delete bitbot.service Moved to its final location at `/docs/bitbot.service` --- bitbot.service | 20 -------------------- 1 file changed, 20 deletions(-) delete mode 100644 bitbot.service diff --git a/bitbot.service b/bitbot.service deleted file mode 100644 index 0640fac7..00000000 --- a/bitbot.service +++ /dev/null @@ -1,20 +0,0 @@ -# This systemd script was made to be used in Ubuntu 18.04 LTS -# Check your distro docs and make the appropriate changes if needed - -[Unit] -Description=BitBot Service -Wants=network-online.target -After=network-online.target - -[Service] -User=$USER -Group=$GROUP -WorkingDirectory=/home/$USER/bitbot -ExecStart=/usr/bin/python3 start.py -ExecReload=/bin/kill -HUP $MAINPID -Restart=always - -[Install] -WantedBy=multi-user.target - -# Remember to change $USER and $GROUP with your actual shell username