From 4a49c16e9a082722286b5124e345a416816786e2 Mon Sep 17 00:00:00 2001
From: Brice Copy <brice.copy@cern.ch>
Date: Sat, 26 Jan 2019 17:39:00 +0100
Subject: [PATCH] Add setup-auth mod

---
 mods/setup-auth/depends.txt |  0
 mods/setup-auth/init.lua    | 11 +++++++++++
 mods/setup-auth/mod.conf    |  3 +++
 3 files changed, 14 insertions(+)
 create mode 100644 mods/setup-auth/depends.txt
 create mode 100644 mods/setup-auth/init.lua
 create mode 100644 mods/setup-auth/mod.conf

diff --git a/mods/setup-auth/depends.txt b/mods/setup-auth/depends.txt
new file mode 100644
index 0000000..e69de29
diff --git a/mods/setup-auth/init.lua b/mods/setup-auth/init.lua
new file mode 100644
index 0000000..c17672d
--- /dev/null
+++ b/mods/setup-auth/init.lua
@@ -0,0 +1,11 @@
+print("setup-path initialization")
+ENV_CTW_ADMIN_PASSWORD="CTW_ADMIN_PASSWORD"
+
+if(os.getenv(ENV_CTW_ADMIN_PASSWORD ~= nil)) then
+  minetest.set_player_password("player1",minetest.get_password_hash("player1","playon1"))
+  minetest.set_player_password("admin",minetest.get_password_hash("admin",os.getenv(ENV_CTW_ADMIN_PASSWORD)))
+  print("setup-path initialized !")
+else
+  print("Authentication not initialized, please define "..ENV_CTW_ADMIN_PASSWORD.." !!")
+end
+
diff --git a/mods/setup-auth/mod.conf b/mods/setup-auth/mod.conf
new file mode 100644
index 0000000..2709095
--- /dev/null
+++ b/mods/setup-auth/mod.conf
@@ -0,0 +1,3 @@
+name = setup-auth
+descriptions = Initializes to a default list of users and privileges 
+depends =