diff --git a/src/freedombone-app-cryptpad b/src/freedombone-app-cryptpad index f16599ef..8309735f 100755 --- a/src/freedombone-app-cryptpad +++ b/src/freedombone-app-cryptpad @@ -287,15 +287,15 @@ function install_cryptpad_main { if [ ! -d /var/www/$CRYPTPAD_DOMAIN_NAME ]; then mkdir /var/www/$CRYPTPAD_DOMAIN_NAME fi - if [ ! -d $CRYPTPAD_DIR ]; then - mkdir -p $CRYPTPAD_DIR + if [ -d $CRYPTPAD_DIR ]; then + rm -rf $CRYPTPAD_DIR + fi - function_check git_clone - git_clone $CRYPTPAD_REPO $CRYPTPAD_DIR - if [ ! -d $CRYPTPAD_DIR ]; then - echo $'Unable to clone cryptpad repo' - exit 783251 - fi + function_check git_clone + git_clone $CRYPTPAD_REPO $CRYPTPAD_DIR + if [ ! -d $CRYPTPAD_DIR ]; then + echo $'Unable to clone cryptpad repo' + exit 783251 fi # an unprivileged user to run as