add snap package

This commit is contained in:
Morgan McMillian 2021-11-20 11:37:10 -08:00
parent dff2cbbc7c
commit 663e012dce
2 changed files with 43 additions and 0 deletions

15
snap/hooks/install Executable file
View file

@ -0,0 +1,15 @@
#!/bin/sh -e
NEW_CONFIG="
ACCESS_TOKEN: \"\"
USERNAME: \"partybot\"
CHANNEL: 0
MNDPUSER: \"mndp\"
"
if test -f "$SNAP_DATA"/config.yaml; then
echo "existing config found..."
else
echo "$NEW_CONFIG" > "$SNAP_DATA"/config.yaml
fi

28
snap/snapcraft.yaml Normal file
View file

@ -0,0 +1,28 @@
name: mndp-partybot # you probably want to 'snapcraft register <name>'
base: core18 # the base snap is the execution environment for this snap
version: 0.2.0 # just for humans, typically '1.2+git' or '1.3.2'
summary: A bot for mndp.tv # 79 char long summary
description: |
Because bots like to party. A bot for https://mndp.tv/
grade: devel # must be 'stable' to release into candidate/stable channels
confinement: strict # use 'strict' once you have the right plugs and slots
parts:
partybot:
plugin: python
python-version: python3
source: .
python-packages:
- PyYAML
- pnutpy
- requests
- SQLAlchemy
- websocket-client
apps:
partybot:
command: bin/partybot
daemon: simple
install-mode: disable
plugs: [network]