type: update id: wordpress-addons name: Addons for WordPress description: Addons for WordPress onAfterClone: - script: delete MANIFEST.id; return {result:0, jps:MANIFEST}; - install [cp]: ${response.jps} envName: ${event.response.env.envName} onInstall: installAddon: - id: setup-site-url-addon nodeGroup: cp - id: cache-purge-addon nodeGroup: cp addons: - id: setup-site-url-addon type: update name: WordPress Site Address (URL) description: The Site Address(URL) setting is the address you want people to type in their browser to reach your WordPress blog. logo: https://github.com/jelastic-jps/wordpress/blob/master/wordpress-edition/images/logo/cluster.svg settings: fields: - type: string name: siteURL caption: Site Address (URL) default: '' required: true regex: "^https?:\\/\\/.+$" regexText: Incorrect Site URL. buttons: - caption: Site URL settings: main action: setup_site_url loadingText: Applying... confirmText: Do you want to change Site URL? successText: Site URL for WordPress has been successfully applyed! - id: cache-purge-addon type: update name: Cache Manager description: Clean all caches at once. Object Cache, Static Cache... logo: https://github.com/jelastic-jps/wordpress/blob/master/wordpress-edition/images/logo/cluster.svg buttons: - caption: Clean all caches action: cache_purge loadingText: Cleaning... confirmText: Do you want to clean all caches? successText: Caches have been successfully cleaned! actions: litespeed-cache-clean: - if (nodes.bl): cmd[bl]: |- [ -d /tmp/lscache/vhosts/Jelastic/ ] && rm -rf /tmp/lscache/vhosts/Jelastic/* &>> /var/log/run.log; - cmd[cp]: |- [ -d /var/www/webroot/.cache/vhosts/Jelastic/ ] && rm -rf /var/www/webroot/.cache/vhosts/Jelastic/* &>> /var/log/run.log; nginx-cache-clean: - cmd[cp]: |- [ -d /var/www/webroot/ROOT/.cache/ ] && rm -rf /var/www/webroot/ROOT/.cache/* &>> /var/log/run.log; wordpress-cache-clean: - cmd[cp]: |- wp cache flush --path=/var/www/webroot/ROOT/ &>> /var/log/run.log; cache_purge: - if (/llsmp/.test("${nodes.cp.nodeType}") || /litespeed/.test("${nodes.cp.nodeType}")): litespeed-cache-clean - if (/lemp/.test("${nodes.cp.nodeType}") || /nginx/.test("${nodes.cp.nodeType}")): nginx-cache-clean - wordpress-cache-clean setup_site_url: - cmd[${nodes.cp.master.id}]: bash ~/bin/setupWP.sh --url ${settings.siteURL} - cache_purge