aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2018-06-23 09:26:52 +0100
committerChristopher Baines <mail@cbaines.net>2018-06-23 12:58:05 +0100
commit0736fd5ab32eeb57de52fb6d581d16c2824b2fc2 (patch)
tree6ed6e54772a6e23a047942e8be7d1ff114949f3d /lib
parentb6c1930ffe65afbbccf1252ca084a932d19c2d64 (diff)
downloadgovuk-mini-environment-admin-0736fd5ab32eeb57de52fb6d581d16c2824b2fc2.tar
govuk-mini-environment-admin-0736fd5ab32eeb57de52fb6d581d16c2824b2fc2.tar.gz
Add a Guix module
Which contains an available_locally? function.
Diffstat (limited to 'lib')
-rw-r--r--lib/guix.rb25
1 files changed, 25 insertions, 0 deletions
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 <mail@cbaines.net>
+#
+# 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
+# <http://www.gnu.org/licenses/>.
+
+module Guix
+ def self.available_locally?
+ File.exist?('/var/guix/daemon-socket/socket')
+ end
+end