add service example

This commit is contained in:
Kaz Saita(raspi4) 2024-03-15 11:06:22 +09:00
parent cfbf49fe38
commit 3d1118a234
3 changed files with 15 additions and 2 deletions

View file

@ -18,7 +18,7 @@ $ poetry install
$ poetry run python -m capture_bot_san
```
For the 1st run(or when it detects lacking any tokens/configs required), it will prompt to gather required access tokens and configuration. Input all of them accordingly.
For the 1st run(or when it detects lacking any tokens/configs required), it will prompt to gather required access tokens and configurations. Input all of them accordingly.
# Configuration

View file

@ -0,0 +1,13 @@
[Unit]
Description = capture bot san
[Service]
WorkingDirectory=/home/kazbo/src/capture_bot_san
ExecStart = /home/kazbo/.local/bin/poetry run python -m capture_bot_san
Restart = no
Type = simple
User = kazbo
[Install]
WantedBy = multi-user.target

View file

@ -28,7 +28,7 @@ def read_tokens():
write_back = True
print('Discord token not set')
print('Go to https://discord.com/developers/applications/ and create it.')
print('New Application -> Bot -> Token-> Copy! or Reset Token if you have already created it.')
print('New Application -> Bot -> Token-> Copy! or Reset Token if you have already created it.')
token.DISCORD_TOKEN = input('Discord Token: ').strip()
if token.DROPBOX_APP_KEY == '' or token.DROPBOX_APP_SECRET == '':
write_back = True