From 64102dd7e4b83e5062e4ee9f9fd53ef2d8ff1d42 Mon Sep 17 00:00:00 2001
From: Mike Lake <Mike.Lake@uts.edu.au>
Date: Tue, 26 Oct 2021 14:47:23 +1100
Subject: [PATCH] Changes to make install script operational.

---
 ...install.sh => install_check_utilisation.sh | 25 +++++++++++--------
 1 file changed, 14 insertions(+), 11 deletions(-)
 rename check_utilisation_install.sh => install_check_utilisation.sh (51%)

diff --git a/check_utilisation_install.sh b/install_check_utilisation.sh
similarity index 51%
rename from check_utilisation_install.sh
rename to install_check_utilisation.sh
index 6b587ce..d6dd4f7 100644
--- a/check_utilisation_install.sh
+++ b/install_check_utilisation.sh
@@ -1,14 +1,17 @@
 #!/bin/bash
 
 # Installs the check_utilisation.py Python script and its dependencies.
-# TODO This would be placed in /usr/local/bin so it can be run by users 
-# but it is still being worked on so its not installed for now.
 #
-# Usage: bash ./check_utilisation_install.sh
+# Usage: bash ./install_check_utilisation.sh
 
+# Set here the location of where the script will be installed to.
+# The "pbs" directory will be installed under here as well.
+# Do not use a trailing slash here.
 dest="/opt/eresearch"
 
-# Check the public users database is up-to-date with the private one.
+# Check the public users database is up-to-date with the private one
+# by doing a quick check of the number of entries.  If you are not using 
+# this db then comment out this section.
 num1=$(echo 'select count(id) from users;' | sqlite3 users_ldap.db)
 num2=$(echo 'select count(id) from users;' | sqlite3 users_ldap_public.db)
 
@@ -21,11 +24,11 @@ fi
 
 # Now do the install.
 
-#mkdir -p ${dest}/pbs
-#cp pbs/pbs.py ${dest}/pbs
-#cp pbs/_pbs.so ${dest}/pbs
-#cp pbs/pbsutils.py ${dest}/pbs
-#cp check_utilisation.py ${dest}
-#cp users_ldap_public.db ${dest}
-#chmod ugo+x ${dest}/check_utilisation.py
+mkdir -p ${dest}/pbs
+cp pbs/pbs.py ${dest}/pbs
+cp pbs/_pbs.so ${dest}/pbs
+cp pbs/pbsutils.py ${dest}/pbs
+cp check_utilisation.py ${dest}
+cp users_ldap_public.db ${dest}
+chmod ugo+x ${dest}/check_utilisation.py
 
-- 
GitLab