Skip to content
Snippets Groups Projects
Select Git revision
  • 4877d416e28434ef3990f0d266d44df3adb4d2b1
  • master default protected
  • 133-fail2ban-page
  • reorganisation
  • 16-maintenace-service
  • 11-fail2ban
  • 6-monit-update
  • 7-dolibarr-fail2ban
  • 6-surveillance-interne-des-serveur
  • test-glpi
  • 2-migrate-to-phpfpm
  • jessie
  • github
13 results

OnlyOffice.sh

Blame
  • David Beniamine's avatar
    David Beniamine authored
    075109d3
    History
    OnlyOffice.sh 1.39 KiB
    #!/bin/bash
    
    echo "RUN $(basename "$0") ==="
    
    DIR=$(realpath $(dirname $0)/..)
    if [ ! -e $DIR/main.env ]
    then
        echo "Please copy in racine of NoCloud Auto Installer main.env.sample to main.env and edit it"
        exit 1
    else
        echo "Environment file loaded"
    fi
    . $DIR/main.env
    
    
    . $DIR/install/main.env
    . $DIR/install/Nextcloud.env
     prefix="sudo -u www-data"
     occ_path="$NEXTCLOUD_INSTALL_DIR/occ"
     occ="$prefix $occ_path"
    
     if [ $( $occ app:list | grep -c richdocuments) -eq 1 ]
     then
        # Collabora is installed
        $occ app:disable richdocuments
        # Cleanup
        systemctl stop collabora
        systemctl disable collabora
        docker rm collabora
        docker rmi collabora/code
        a2dissite collabora.conf
        a2dissite collabora-le-ssl.conf
        apache2ctl graceful
        if [ $(docker ps -a | wc -l) -eq 1 ]
        then
            # No need for docker anymore
            aptitude purge $(dpkg -l | awk '/docker/{print $2}')
            sed -i 's/\(.*docker.*\)/# \1/' /etc/apt/sources.list
            rm /etc/apt/sources.list.d/docker.list
            aptitude update
        fi
     fi
    $occ app:enable documentserver_community
    $occ app:enable onlyoffice
    for setting in customizationChat customizationFeedback customizationHelp customizationToolbarNoTabs
    do
        $occ config:app:set onlyoffice $setting --value false
    done
    $occ config:app:set onlyoffice DocumentServerUrl --value "https://nextcloud.$DOMAIN/index.php/apps/documentserver_community/"