| t@@ -4,12 +4,13 @@ create-webdav-hook() {
fn create-webdav-hook
davconf="/etc/apache2/sites-available/coffindav.conf"
+ davpass="/etc/apache2/DAV/davpasswd"
if [[ $entry =~ webdav && -f $COFFINDOT/webdav.conf ]]; then
act "Found WebDAV data. Setting up..."
[[ -f $COFFINDOT/davpasswd ]] && {
- cat $COFFINDOT/davpasswd >> /etc/apache2/davpasswd
+ cat $COFFINDOT/davpasswd >> $davpass
[[ $? = 0 ]] && {
rm $COFFINDOT/davpasswd
gpasswd -a www-data $undertaker # NOTE: consider standalone group
t@@ -49,7 +50,7 @@ create-sshfs-hook() {
if [[ $entry =~ sshfs && -f $COFFINDOT/sshpubkey ]]; then
act "Found SSH data. Setting up..."
- mkdir -p /home/$undertaker/.ssh
+ [[ -d /home/$undertaker/.ssh ]] || mkdir -p /home/$undertaker/.ssh
cat $COFFINDOT/$tombid.pub >> /home/$undertaker/.ssh/authorized_keys
chown -R $undertaker:$undertaker /home/$undertaker/.ssh
chmod 700 /home/$undertaker/.ssh && chmod 600 /home/$undertaker/.ssh/authorized_keys |