aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZach Latta <zach@zachlatta.com>2016-07-23 15:23:33 -0700
committerGitHub <noreply@github.com>2016-07-23 15:23:33 -0700
commitb8eeb4a403ce6bcf2fd821d0b22b5739424b971c (patch)
tree4baafbf1f645cbfed2503e088599bd742c191022
parente2dd7918cf314190d821bb96e9d4731ff189acb0 (diff)
parent0ddcaaaa82cefc820714a2bfd7b97020f958f81c (diff)
downloadsshtron-b8eeb4a403ce6bcf2fd821d0b22b5739424b971c.tar.gz
Merge pull request #17 from Roadmaster/master
Add wrapper script and snapcraft.yaml for packaging as a snap.
-rw-r--r--snapcraft.yaml24
-rwxr-xr-xsshtron.sh7
2 files changed, 31 insertions, 0 deletions
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
Un proyecto texto-plano.xyz