Remove any previous directory on install

This commit is contained in:
Bob Mottram 2017-05-26 14:59:44 +01:00
parent 5f5e2810ec
commit f3f218867e
1 changed files with 8 additions and 8 deletions

View File

@ -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