added separate script for mapping nfs shares
This commit is contained in:
10
debian/debian-essentials.sh
vendored
10
debian/debian-essentials.sh
vendored
@@ -141,16 +141,6 @@ echo "unbind C-b" >> /etc/tmux.conf
|
|||||||
echo "set-option -g prefix C-a" >> /etc/tmux.conf
|
echo "set-option -g prefix C-a" >> /etc/tmux.conf
|
||||||
echo "bind-key C-a send-prefix" >> /etc/tmux.conf
|
echo "bind-key C-a send-prefix" >> /etc/tmux.conf
|
||||||
|
|
||||||
# create credentials and map network drives
|
|
||||||
isInFile=$(cat /etc/fstab | grep -c "192.168.1.41")
|
|
||||||
if [ $isInFile -eq 0 ]
|
|
||||||
then
|
|
||||||
mkdir /mnt/truenasdata > /dev/null 2>&1
|
|
||||||
chown akanealw:akanealw /mnt/truenasdata
|
|
||||||
echo "# nfs shares" >> /etc/fstab
|
|
||||||
echo "192.168.1.41:/mnt/data /mnt/truenasdata nfs defaults,nolock,soft,vers=4.2 0 0" >> /etc/fstab
|
|
||||||
fi
|
|
||||||
|
|
||||||
# configure email for sending notifications
|
# configure email for sending notifications
|
||||||
isInFile=$(cat /etc/postfix/main.cf | grep -c "gmail")
|
isInFile=$(cat /etc/postfix/main.cf | grep -c "gmail")
|
||||||
if [ $isInFile -eq 0 ]
|
if [ $isInFile -eq 0 ]
|
||||||
|
|||||||
17
debian/debian-map-truenas-data.sh
vendored
Normal file
17
debian/debian-map-truenas-data.sh
vendored
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
if [ "$EUID" -ne 0 ]
|
||||||
|
then
|
||||||
|
echo "Please run as root"
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
|
||||||
|
# map truenas data
|
||||||
|
isInFile=$(cat /etc/fstab | grep -c "192.168.1.41")
|
||||||
|
if [ $isInFile -eq 0 ]
|
||||||
|
then
|
||||||
|
mkdir /mnt/truenasdata > /dev/null 2>&1
|
||||||
|
chown akanealw:akanealw /mnt/truenasdata
|
||||||
|
echo "# nfs shares" >> /etc/fstab
|
||||||
|
echo "192.168.1.41:/mnt/data /mnt/truenasdata nfs defaults,nolock,soft,vers=4.2 0 0" >> /etc/fstab
|
||||||
|
fi
|
||||||
Reference in New Issue
Block a user