From 78b88225719165cdb33a21541abf31ea49dfae9f Mon Sep 17 00:00:00 2001 From: faulty Date: Wed, 14 Dec 2022 09:17:03 +0100 Subject: [PATCH] mount script --- tools/mount.sh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 tools/mount.sh diff --git a/tools/mount.sh b/tools/mount.sh new file mode 100644 index 0000000..cfaa45f --- /dev/null +++ b/tools/mount.sh @@ -0,0 +1,17 @@ +#!/bin/sh + +ORIGIN=`pwd` + +if [ "$(id -u)" -ne 0 ]; then + echo "Please run as root" + exit +fi + +cd /etc/credentials +for file in ./* do + echo "# mounting $file" + . $file + mount -t cifs //$domain/backup /mnt/$file -o credentials=/etc/credentials/$file +fi + +cd $ORIGIN