Remove any existing xmpp install before starting new one

This commit is contained in:
Bob Mottram 2017-05-17 22:05:05 +01:00
parent 2ab495c57f
commit 4de59f40d8
1 changed files with 14 additions and 2 deletions

View File

@ -508,10 +508,10 @@ function remove_xmpp {
remove_onion_service xmpp 5222 5223 5269
apt-get -yq remove --purge prosody
if [ ! -f $INSTALL_DIR/$prosody_modules_filename ]; then
if [ -f $INSTALL_DIR/$prosody_modules_filename ]; then
rm $INSTALL_DIR/$prosody_modules_filename
fi
if [ ! -d $INSTALL_DIR/prosody-modules ]; then
if [ -d $INSTALL_DIR/prosody-modules ]; then
rm -rf $INSTALL_DIR/prosody-modules
fi
if [ -d /etc/prosody ]; then
@ -793,6 +793,18 @@ function install_xmpp_nightly {
}
function install_xmpp {
if [ ! -d $INSTALL_DIR ]; then
mkdir -p $INSTALL_DIR
fi
# remove any existing install attempt
if [ -f $INSTALL_DIR/$prosody_modules_filename ]; then
rm $INSTALL_DIR/$prosody_modules_filename
fi
if [ -d $INSTALL_DIR/prosody-modules ]; then
rm -rf $INSTALL_DIR/prosody-modules
fi
update_prosody_modules
if [[ $ONION_ONLY == 'no' ]]; then