Added example start script and service file

master
Joey Hines 2019-12-13 21:46:58 -06:00
parent bc6a77257f
commit 555b1fd3ee
2 changed files with 40 additions and 0 deletions

View File

@ -0,0 +1,17 @@
# Service file for the Geoffrey Discord Bot
[Unit]
Description=Geoffrey Discord Bot
After=multi-user.target
[Service]
User=geoffrey
Group=geoffrey
ExecStart=/home/geoffrey/venv/bin/python3 /home/geoffrey/discord_bot/geoffrey_bot_start.py
Type=simple
Restart=always
RestartSec=15
TimeoutStartSec=15
[Install]
WantedBy=multi-user.target

View File

@ -0,0 +1,23 @@
from GeoffreyBot import bot
# Set discord_token to the token for the Discord bot
discord_token = ""
# Set geoffrey_api_url to the base api url of the GeoffreyApp
# Example:
# https://test.zerohighdef.com/GeoffreyApp/api/
geoffrey_api_url = "https://test.zerohighdef.com/GeoffreyApp/api/"
# Set geoffrey_base_url to the base link of the url
# Example:
# If Geoffrey runs at https://test.zerohighdef.com/GeoffreyApp/home
# geoffrey_app_url would be https://test.zerohighdef.com/
geoffrey_base_url = "https://test.zerohighdef.com"
# Set geoffrey_token to the token generated by the GeoffreyApp
geoffrey_token = ""
if __name__ == '__main__':
print("Starting bot and connecting to {}".format(geoffrey_api_url))
bot.start_bot(discord_token=discord_token, geoffrey_api_url=geoffrey_api_url, geoffrey_api_token=geoffrey_token,
geoffrey_app_url=geoffrey_base_url)