summaryrefslogtreecommitdiff
path: root/s3_mountscripts.sh
diff options
context:
space:
mode:
authorB Stack <bgstack15@gmail.com>2016-10-20 16:15:23 -0400
committerB Stack <bgstack15@gmail.com>2016-10-20 16:15:23 -0400
commitd60ed67fa4eeeba312646358316e49c0a6cbc6f6 (patch)
tree7cec285c82c1e15cc021086899165afb7bed2385 /s3_mountscripts.sh
downloaddeployscripts-d60ed67fa4eeeba312646358316e49c0a6cbc6f6.tar.gz
deployscripts-d60ed67fa4eeeba312646358316e49c0a6cbc6f6.tar.bz2
deployscripts-d60ed67fa4eeeba312646358316e49c0a6cbc6f6.zip
initial commit
Diffstat (limited to 's3_mountscripts.sh')
-rwxr-xr-xs3_mountscripts.sh35
1 files changed, 35 insertions, 0 deletions
diff --git a/s3_mountscripts.sh b/s3_mountscripts.sh
new file mode 100755
index 0000000..a7b6c6b
--- /dev/null
+++ b/s3_mountscripts.sh
@@ -0,0 +1,35 @@
+#!/bin/bash
+# File: /root/s3_mountscripts.sh
+# Package: deployscripts
+# Author: bgstack15
+# Startdate: 2015
+# Title: Template Script 3: Mount Scripts Directory
+# Purpose: Mounts the network mount for this organization
+# History: 2016-05-19 given original headers
+# Usage: ./s3[tab][enter]
+# Reference:
+# Improve:
+
+server=$( hostname )
+ipaddr=$( ifconfig | grep -E "Bcast|broadcast" | awk '{print $2}' | sed 's/[^0-9\.]//g;' )
+sdir=/mnt/scripts
+
+if [[ ! "$1" = "-y" ]];
+then
+ cat <<EOFNOTICE
+ensure on norite.example.com:
+ 1. /etc/exports is allowing this host ("${server}")
+ 2. /etc/sysconfig/iptables allows this ip address ("${ipaddr}")
+ 3. service nfs restart
+ 4. service iptables restart
+rerun this script with "-y"
+
+References:
+https://protect.example.com/wiki/display/itops/norite
+EOFNOTICE
+else
+ # so "-y" was used
+ [[ ! -d ${sdir} ]] && mkdir -p ${sdir} 2>/dev/null
+ #mount -t nfs norite.example.com:/mnt/scripts /mnt/scripts
+ mount /mnt/scripts #it better be in /etc/fstab!
+fi
bgstack15