Last active
November 19, 2019 06:48
-
-
Save jmahlman/4261c3c0af2a9713802f8f7a469c4ff2 to your computer and use it in GitHub Desktop.
Automount a shared directory for use with backburner rendering
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# make local "server" directory | |
SERVERDIR="/macsvr1" | |
if [ ! -e ${SERVERDIR} ]; then | |
mkdir ${SERVERDIR} | |
mkdir ${SERVERDIR}/Backburner | |
chmod -R 777 ${SERVERDIR} | |
else | |
echo "${SERVERDIR} already exsits, skipping." | |
fi | |
# add smb mount to auto_master | |
AUTOMASTER="/etc/auto_master" | |
if [ "$(grep "auto_smb" $AUTOMASTER)" != "/- auto_smb" ]; then | |
echo "Adding auto_smb to ${AUTOMASTER}" | |
echo "/- auto_smb" >> $AUTOMASTER | |
else | |
echo "auto_smb exists in ${AUTOMASTER}. Skipping auto_master setup." | |
fi | |
# create auto_smb file | |
AUTOSMB="/etc/auto_smb" | |
if [ ! -f ${AUTOSMB} ]; then | |
echo "Generating ${AUTOSMB}" | |
touch ${AUTOSMB} | |
echo "/macsvr1/Backburner -fstype=smbfs ://guest@macsvr1/Backburner" > $AUTOSMB | |
# re-check mounts | |
automount -vc | |
else | |
echo "Skipping generation of ${AUTOSMB}. Already exists." | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment