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 6b587ce41101553983b2c1fff5f7f134c7f19d0a..d6dd4f74951e6f2924b50b453463ae270c7be640 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