|
|
|
@ -32,24 +32,33 @@ function parse_options { |
|
|
|
} |
|
|
|
|
|
|
|
function assert_miaou_server { |
|
|
|
[[ -d /opt/miaou-incus ]] || |
|
|
|
[[ -d /opt/miaou-proxmox ]] || |
|
|
|
(>&2 echo 'ERROR: either miaou-{incus,proxmox} must be installed on this host prior running this command!' && exit 10) |
|
|
|
[[ -d /opt/miaou-incus ]] \ |
|
|
|
|| [[ -d /opt/miaou-proxmox ]] \ |
|
|
|
|| (>&2 echo 'ERROR: either miaou-{incus,proxmox} must be installed on this host prior running this command!' && exit 10) |
|
|
|
} |
|
|
|
|
|
|
|
function install_sympa_tools { |
|
|
|
function add_sympa_tools { |
|
|
|
for file in "$BASEDIR"/../resources/tools/*; do |
|
|
|
miaou-push $CONTAINER $file /opt/miaou-sympa/tools/ |
|
|
|
done |
|
|
|
miaou-exec $CONTAINER -- ln -sf /usr/lib/sympa/bin/sympa.pl /opt/miaou-sympa/tools/ |
|
|
|
} |
|
|
|
|
|
|
|
function customize_style { |
|
|
|
miaou-recipe "$CONTAINER" "$BASEDIR"/../recipe/sympa_custom_style.recipe |
|
|
|
} |
|
|
|
|
|
|
|
function install_sympa { |
|
|
|
miaou-recipe "$CONTAINER" "$BASEDIR"/../recipe/sympa.recipe |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
# MAIN |
|
|
|
|
|
|
|
set -Eue |
|
|
|
parse_options $* |
|
|
|
assert_miaou_server |
|
|
|
|
|
|
|
miaou-recipe "$CONTAINER" "$BASEDIR"/../recipe/sympa.recipe |
|
|
|
miaou-recipe "$CONTAINER" "$BASEDIR"/../recipe/sympa_custom_style.recipe |
|
|
|
install_sympa_tools |
|
|
|
install_sympa |
|
|
|
customize_style |
|
|
|
add_sympa_tools |