blob: 6ddbc0fd80f49fb0636879c5934cbb5475d94ccf (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
#!/bin/bash
path="/media/elektroline"
usage() {
echo "Usage: $0 [OPTION].." >&2
}
umount="n"
while getopts "u" opt; do
case "$opt" in
u)
umount="y"
;;
*)
usage
exit 2
;;
esac
done
if [ "$umount" = "n" ]; then
sudo mkdir -p "$path"/{company,elektro_doc}
sudo mount.cifs -o username=kkoci "//Elektroline00/company" "$path/company"
sudo mount.cifs -o username=kkoci "//Elektroline00/elektro_doc" "$path/elektro_doc"
else
sudo umount "$path/company" "$path/elektro_doc"
fi
|