From 826e7ea9a3303fa1ea1044b6022992038f40333f Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Sat, 25 Jul 2015 00:02:00 +0300 Subject: Check for python version --- yarns/100-willikins.yarn | 1 + yarns/900-implements.yarn | 9 +++++++++ 2 files changed, 10 insertions(+) (limited to 'yarns') diff --git a/yarns/100-willikins.yarn b/yarns/100-willikins.yarn index 3004019..697897b 100644 --- a/yarns/100-willikins.yarn +++ b/yarns/100-willikins.yarn @@ -9,3 +9,4 @@ backups. It is only ever accessed over ssh (including sftp). THEN server responds to ping AND server hostname is as expected AND server account has sudo + AND server has python version 2 installed diff --git a/yarns/900-implements.yarn b/yarns/900-implements.yarn index 7c40885..f08baee 100644 --- a/yarns/900-implements.yarn +++ b/yarns/900-implements.yarn @@ -39,6 +39,15 @@ access to root? ssh "$ACCOUNT@$SERVER" sudo -n id -u > "$DATADIR/id.out" grep -F 0 "$DATADIR/id.out" +## Python 2 installed? + +Does the server have Python 2 installed, by invoking `python`? + + IMPLEMENTS THEN server has python version 2 installed + . "$DATADIR/config.sh" + ssh "$ACCOUNT@$SERVER" python --version 2> "$DATADIR/python.out" + grep "^Python 2\." "$DATADIR/python.out" + ## Running command over ssh Run a command on the server over ssh, capturing stdout and stderr and -- cgit v1.2.1