forked from rapyd-cloud/rapyd-vz-support
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrapyd-woocommerce-installer.sh
34 lines (23 loc) · 1.31 KB
/
rapyd-woocommerce-installer.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/bin/bash
# must be run as root - litespeed user
######################################################################################################################
# install woocommerce
# todo - investigate any other plugins or settings we would like to
#################################################################################
WP_ROOT="/var/www/webroot/ROOT"
#################################################################################
# get the current list of all active plugins
# we are going to use this later to skip all installed plugins apart for those we want to test
cd "$WP_ROOT"
SKIPPLUGINS='^litespeed-cache$\|^object-cache-pro$\|^redis-cache$'
SKIPLIST=$(wp --skip-plugins --skip-themes --quiet plugin list --field=name 2>/dev/null | grep -v $SKIPPLUGINS | tr '\n' ',' )
#################################################################################
cd "$WP_ROOT"
wp --skip-plugins --skip-themes --quiet plugin is-installed woocommerce 2>/dev/null
if [ "$?" -ne 0 ]
then
wp --skip-plugins --skip-themes --quiet plugin install woocommerce 2>/dev/null
wp --skip-plugins --skip-themes --quiet plugin activate woocommerce 2>/dev/null
fi
# end woocommerce
######################################################################################################################