diff --git a/dd-ctl b/dd-ctl index a3afc1b..4ac4ba6 100755 --- a/dd-ctl +++ b/dd-ctl @@ -772,16 +772,19 @@ upgrade_plugins_wp(){ # TODO: Fix this, check https://gitlab.com/DD-workspace/DD/-/issues/16 ##install plugin gsite docker exec -i dd-apps-wordpress sh -s <<-EOF - apt-get update - apt-get install -y git - apt install -y zlib1g-dev libjpeg-dev libpng-dev - apt-get install -y python3 python3-click python3-scrapy python3-unidecode python3-pillow python3-slugify - apt-get install -y curl - git clone https://gitlab.com/isard/gsite2wordpress - mv /var/www/html/gsite2wordpress /var/www - curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar - chmod +x wp-cli.phar - mv wp-cli.phar /usr/local/bin/wp + + if [ ! -d "/var/www/gsite2wordpress" ];then + apt-get update + apt-get install -y git + apt install -y zlib1g-dev libjpeg-dev libpng-dev + apt-get install -y python3 python3-click python3-scrapy python3-unidecode python3-pillow python3-slugify + apt-get install -y curl + git clone https://gitlab.com/isard/gsite2wordpress + mv /var/www/html/gsite2wordpress /var/www + curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar + chmod +x wp-cli.phar + mv wp-cli.phar /usr/local/bin/wp + fi EOF } @@ -914,8 +917,8 @@ case "$OPERATION" in setup_moodle setup_wordpress - chown 82:82 /opt/DD/data/moodle/saml2/* - chmod 777 /opt/DD/data/moodle/saml2/* + chown 82:82 /opt/DD/data/moodle/saml2/* + chmod 777 /opt/DD/data/moodle/saml2/* saml --no-up