aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Manrique <roadmr@ubuntu.com>2016-07-08 17:19:22 -0400
committerDaniel Manrique <roadmr@ubuntu.com>2016-07-08 17:26:51 -0400
commit0ddcaaaa82cefc820714a2bfd7b97020f958f81c (patch)
tree4baafbf1f645cbfed2503e088599bd742c191022
parente2dd7918cf314190d821bb96e9d4731ff189acb0 (diff)
downloadsshtron-0ddcaaaa82cefc820714a2bfd7b97020f958f81c.tar.gz
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.
-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