2020-05-19 20:47:52 +00:00
|
|
|
# This systemd script was made to be used in Ubuntu 18.04 LTS
|
|
|
|
# Check your distro and make the appropriate changes if needed
|
|
|
|
# In order to allow the user to run their own systemd scripts
|
|
|
|
# you need to type the following as root:
|
|
|
|
# loginctl enable-linger $USER (replace $USER with the shell username)
|
|
|
|
# User systemd scripts are placed inside /home/$USER/.config/systemd/user
|
|
|
|
# All commands are issued as: systemctl --user [start|stop|restart|reload|enable|disable] service_name.service
|
|
|
|
# If the folder doesn't exist, type: systemctl --user enable systemd-tmpfiles-clean.timer
|
|
|
|
# This will automatically create the folder and enable the tempfiles clean timer,
|
|
|
|
# which can be disabled with: systemctl --user disable systemd-tmpfiles-clean.timer
|
|
|
|
#
|
|
|
|
# After placing this script in the correct location, and with bitbot stopped, type:
|
2021-02-12 17:21:09 +00:00
|
|
|
# systemcl --user daemon-reload
|
|
|
|
# Afert that start bitbot with:
|
2020-05-19 20:47:52 +00:00
|
|
|
# systemctl --user enable bitbot_user.service --now
|
|
|
|
# This will enable the systemd script and launch bitbot
|
|
|
|
|
|
|
|
[Unit]
|
|
|
|
Description=BitBot Service (User)
|
2020-05-19 20:49:56 +00:00
|
|
|
Wants=default.target
|
2020-05-19 20:47:52 +00:00
|
|
|
After=default.target
|
|
|
|
|
|
|
|
[Service]
|
|
|
|
# change any of the 4 following lines as applicable
|
|
|
|
# The %h will be replaced with the user home directory
|
|
|
|
# like /home/bitbot
|
|
|
|
WorkingDirectory=%h/bitbot
|
2020-07-10 15:53:49 +00:00
|
|
|
ExecStart=/usr/bin/env python3 bitbotd
|
|
|
|
ExecStop=/usr/bin/env python3 bitbotctl stop
|
|
|
|
ExecReload=/usr/bin/env python3 bitbotctl reload
|
2020-05-19 20:47:52 +00:00
|
|
|
Restart=always
|
|
|
|
|
|
|
|
[Install]
|
2020-05-19 20:52:07 +00:00
|
|
|
WantedBy=default.target
|