if gsite2wordpress exist, do nothing

feature/upgrade_improvements
elena 2022-11-07 10:26:02 +00:00
parent bd27ef4b6a
commit 63b9ed6ac2
1 changed files with 15 additions and 12 deletions

27
dd-ctl
View File

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