Changing hostname check to domain name

This commit is contained in:
Noah L. Schrick 2021-12-10 16:03:35 -06:00
parent c6c5171d38
commit a156a97e6d
2 changed files with 2 additions and 2 deletions

View File

@ -1,6 +1,6 @@
#!/usr/bin/env bash #!/usr/bin/env bash
if [ "$DNSDOMAINNAME" = "hammer.esg.utulsa.edu" ]; then if [ "$(dnsdomainname)" = "hammer.esg.utulsa.edu" ]; then
echo "Loading Modules." echo "Loading Modules."
module load cmake module load cmake
module load gcc module load gcc

View File

@ -11,7 +11,7 @@ strval1="sync"
strval2="non-sync" strval2="non-sync"
#Hammer #Hammer
if [ "$DNSDOMAINNAME" = "hammer.esg.utulsa.edu" ]; then if [ "$(dnsdomainname)" = "hammer.esg.utulsa.edu" ]; then
#Database stored on node with port #Database stored on node with port
if psql -p 5240 -h login ${DBNAME} -c '\q' 2>&1; then if psql -p 5240 -h login ${DBNAME} -c '\q' 2>&1; then
echo "Database ${DBNAME} exists. Dropping and recreating from dump." echo "Database ${DBNAME} exists. Dropping and recreating from dump."