From 0ddcaaaa82cefc820714a2bfd7b97020f958f81c Mon Sep 17 00:00:00 2001 From: Daniel Manrique Date: Fri, 8 Jul 2016 17:19:22 -0400 Subject: Add wrapper script and snapcraft.yaml for packaging as a snap. This requires snapcraft to build the snap package, which can then be installed on Ubuntu or any Linux distro with snapd installed. --- snapcraft.yaml | 24 ++++++++++++++++++++++++ sshtron.sh | 7 +++++++ 2 files changed, 31 insertions(+) create mode 100644 snapcraft.yaml create mode 100755 sshtron.sh diff --git a/snapcraft.yaml b/snapcraft.yaml new file mode 100644 index 0000000..b60b75a --- /dev/null +++ b/snapcraft.yaml @@ -0,0 +1,24 @@ +--- +name: sshtron +version: 1.0 +summary: Multiplayer Tron via SSH +description: > + Multiplayer Tron game, accessible via SSH. + Once it's installed, ssh to port 2022, and steer using the W A S D keys. +confinement: strict +apps: + sshtron: + command: bin/sshtron-server + daemon: simple + plugs: [network-bind] + +parts: + sshtron: + plugin: go + source: git://github.com/zachlatta/sshtron + glue: + plugin: copy + files: + sshtron.sh: bin/sshtron-server + stage-packages: + - openssh-client diff --git a/sshtron.sh b/sshtron.sh new file mode 100755 index 0000000..416c663 --- /dev/null +++ b/sshtron.sh @@ -0,0 +1,7 @@ +#!/bin/sh + +cd "$SNAP_DATA" + +[ -f id_rsa ] || $SNAP/usr/bin/ssh-keygen -t rsa -N '' -f id_rsa + +sshtron > "$SNAP_DATA/sshtron.log" 2>&1 -- cgit v1.2.3