commit 4bb95404c004caea78e233a8fb4b8ac0b5ba64bb
parent 936eaabdf97d76a188d416cb1addb41247fa44f5
Author: parazyd <parazyd@dyne.org>
Date: Mon, 7 Mar 2016 21:22:40 +0100
permission fixes
Diffstat:
1 file changed, 8 insertions(+), 7 deletions(-)
diff --git a/gmakehook b/gmakehook
@@ -174,9 +174,10 @@ function _clean {
# {{{ zenity dialogs
function _fsel {
- --window-icon="$MONMORT" \
- --file-selection \
- --title="$1"
+ zenity \
+ --window-icon="$MONMORT" \
+ --file-selection \
+ --title="$1"
}
function _zenques {
zenity \
@@ -242,10 +243,10 @@ function _writedavinfo {
&& echo -n "$UNDERTAKER:WebDAV:$davpass" \
| md5sum \
| awk '{print $1}')
- print $davinfo > $coffindot/davinfo
+ print $davinfo | sudo tee $coffindot/davinfo
fi
- cat <<EOF > $coffindot/webdav.conf
+ cat <<EOF | sudo tee $coffindot/webdav.conf
alias /${TOMBNAME} /media/${TOMBNAME}
<Directory "/media/${TOMBNAME}">
@@ -390,7 +391,7 @@ function _create {
else
print "create:${UNDERTAKER}:${TOMBNAME}:${TOMBSIZE}:${feats}" | sudo tee $hooks
if [[ $feats =~ "webdav" ]]; then; _writedavinfo; fi
- if [[ -n $sshpubkey ]]; then; cp $sshpubkey ./sshpubkey ; fi
+ if [[ -n $sshpubkey ]]; then; sudo cp $sshpubkey ./sshpubkey ; fi
if [[ -n $bindhook ]]; then
print "$bindhook" | sudo tee $coffindot/bindhooks
fi
@@ -403,7 +404,7 @@ function _create {
else
print "create:${UNDERTAKER}:${TOMBNAME}:${TOMBSIZE}:${feats}" | sudo tee $hooks
if [[ $feats =~ "webdav" ]]; then; _writedavinfo; fi
- if [[ -n $sshpubkey ]]; then; cp $sshpubkey $coffindot/sshpubkey ; fi
+ if [[ -n $sshpubkey ]]; then; sudo cp $sshpubkey $coffindot/sshpubkey ; fi
if [[ -n $bindhook ]]; then
print "$bindhook" | sudo tee $coffindot/bindhooks
fi