From 0736fd5ab32eeb57de52fb6d581d16c2824b2fc2 Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Sat, 23 Jun 2018 09:26:52 +0100 Subject: Add a Guix module Which contains an available_locally? function. --- lib/guix.rb | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 lib/guix.rb (limited to 'lib') diff --git a/lib/guix.rb b/lib/guix.rb new file mode 100644 index 0000000..a9cc7b0 --- /dev/null +++ b/lib/guix.rb @@ -0,0 +1,25 @@ +# GOV.UK Mini Environment Admin +# Copyright © 2018 Christopher Baines +# +# This file is part of the GOV.UK Mini Environment Admin. +# +# The GOV.UK Mini Environment Admin is free software: you can +# redistribute it and/or modify it under the terms of the GNU Affero +# General Public License as published by the Free Software Foundation, +# either version 3 of the License, or (at your option) any later +# version. +# +# The GOV.UK Mini Environment Admin is distributed in the hope that it +# will be useful, but WITHOUT ANY WARRANTY; without even the implied +# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public +# License along with the GOV.UK Mini Environment Admin. If not, see +# . + +module Guix + def self.available_locally? + File.exist?('/var/guix/daemon-socket/socket') + end +end -- cgit v1.2.3