summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorSimon Rettberg2015-02-24 16:26:17 +0100
committerSimon Rettberg2015-02-24 16:26:17 +0100
commita566736e62ebca8a0e93c5c07c3c07cceded9826 (patch)
tree2aaa537d644c5c6b473b458e0dc287bfa7796ca0 /scripts
parentFix AD pam and scripts (diff)
downloadtmlite-bwlp-a566736e62ebca8a0e93c5c07c3c07cceded9826.tar.gz
tmlite-bwlp-a566736e62ebca8a0e93c5c07c3c07cceded9826.tar.xz
tmlite-bwlp-a566736e62ebca8a0e93c5c07c3c07cceded9826.zip
Bump
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/ldadp-setperms19
-rwxr-xr-xscripts/mount-store4
2 files changed, 21 insertions, 2 deletions
diff --git a/scripts/ldadp-setperms b/scripts/ldadp-setperms
new file mode 100755
index 0000000..2c6ea08
--- /dev/null
+++ b/scripts/ldadp-setperms
@@ -0,0 +1,19 @@
+#!/bin/bash
+
+BASE="/opt/ldadp/configs"
+
+[ -z "$1" ] && exit 11
+echo "$1" | grep -q -E '^[0-9]+$' || exit 12
+
+FILE="${BASE}/${1}"
+
+[ -e "${FILE}.cfg" ] || exit 9
+[ -e "${FILE}.crt.pem" ] || exit 8
+[ -e "${FILE}.key.pem" ] || exit 7
+
+for ext in cfg crt.pem key.pem; do
+ file="${FILE}.${ext}"
+ /bin/chown taskmanager:ldadp "$file" || exit 6
+ /bin/chmod 0640 "$file" || exit 5
+done
+
diff --git a/scripts/mount-store b/scripts/mount-store
index d5dcbba..f44299f 100755
--- a/scripts/mount-store
+++ b/scripts/mount-store
@@ -61,7 +61,7 @@ touch "${DEST}/.notmounted"
if grep -E -q '^[^/].+:.+' <<<$SOURCE; then
# seems to be NFS
for i in 1 2 3; do
- mount -t nfs -o rw,async,nolock,vers=3,fg,ac,retry=1,timeo=100,sec=sys "$SOURCE" "$DEST"
+ mount -v -t nfs -o rw,async,nolock,vers=3,fg,ac,retry=1,timeo=100,sec=sys "$SOURCE" "$DEST"
RET=$?
[ "$RET" -eq "0" ] && break
done
@@ -71,7 +71,7 @@ elif grep -E -q '^//' <<<$SOURCE; then
export PASSWD="$PASSWORD"
for sec in ntlmv2 ntlm; do
echo " * Trying ${sec}..."
- mount -t cifs -o rw,uid=0,gid=12345,forceuid,forcegid,file_mode=0664,dir_mode=0775,sec=$sec "$SOURCE" "$DEST"
+ mount -v -t cifs -o rw,uid=0,gid=12345,forceuid,forcegid,file_mode=0664,dir_mode=0775,sec=$sec "$SOURCE" "$DEST"
RET=$?
if [ "$RET" -eq "0" ]; then
echo " * Success!"