diff --git a/snap/hooks/install b/snap/hooks/install new file mode 100755 index 0000000..5cf796d --- /dev/null +++ b/snap/hooks/install @@ -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 + diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml new file mode 100644 index 0000000..543cf28 --- /dev/null +++ b/snap/snapcraft.yaml @@ -0,0 +1,28 @@ +name: mndp-partybot # you probably want to 'snapcraft register ' +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]