#!/bin/bash MANDATORY_PACKAGES_STRING="nginx php-cli php-fpm php-mysql php-curl php-xml php-imagick php-zip php-gd php-intl composer mariadb-client" ### CHECK function check() { PREFIX="recipe:wordpress:check" check_mandatory_packages || return 21 check_wordpress_tgz || return 22 check_wp-tool || return 23 check_wp-backup || return 24 return 0 } function check_mandatory_packages() { lxc exec "$CONTAINER" -- bash </dev/null | grep -q ^ii done EOF } function check_wp-tool() { lxc exec "$CONTAINER" -- test -f /usr/local/sbin/wp-tool } function check_wp-backup() { lxc exec "$CONTAINER" -- test -f /usr/local/sbin/wp-backup } function check_wordpress_tgz() { lxc exec "$CONTAINER" -- test -f /var/www/wordpress-latest.tgz } ### INSTALL function install() { PREFIX="recipe:wordpress:install" : $PREFIX launch_container "$CONTAINER" echo "initializing Wordpress ... " lxc exec "$CONTAINER" -- bash <