This repository has been archived on 2023-05-02. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
neo/tools/mount.sh
2022-12-14 09:26:05 +01:00

19 lines
354 B
Bash

#!/bin/sh
ORIGIN=`pwd`
if [ "$(id -u)" -ne 0 ]; then
echo "Please run as root"
exit
fi
cd /etc/credentials
for file in *; do
[ ! -f "$file" ] && continue
echo "# mounting $file"
. ./$file
[ -d /mnt/$file ] || mkdir /mnt/$file
mount -t cifs //$domain/backup /mnt/$file -o credentials=/etc/credentials/$file
done
cd $ORIGIN