#!/bin/bash MANDATORY_PACKAGES_STRING="nginx php-fpm php-mysql php-zip php-gd php-xml php-ldap php-imap composer mariadb-client" ### CHECK function check() { PREFIX="recipe:limesurvey:check" check_mandatory_packages || return 21 check_limesurvey_zip || return 22 return 0 } function check_mandatory_packages() { lxc exec "$CONTAINER" -- bash </dev/null | grep -q ^ii done EOF } function check_limesurvey_zip() { lxc exec "$CONTAINER" -- test -f /var/www/limesurvey-latest.zip } ### INSTALL function install() { PREFIX="recipe:limesurvey:install" : $PREFIX launch_container "$CONTAINER" echo "initializing limesurvey ... " lxc exec "$CONTAINER" -- bash <