Tweak config management to allow defining parameters through inline bash variables

This commit is contained in:
Alexandre Aubin 2020-12-25 15:23:14 +01:00
parent e3506a3208
commit 6cc335eafe

View file

@ -1,25 +1,22 @@
#!/bin/bash #!/bin/bash
ARCH="amd64" # Yunohost install parameters
DIST="buster"
# Yunohost version: stable, testing or unstable
YNH_BRANCH="stable"
# Admin password
YUNO_PWD="admin" YUNO_PWD="admin"
# Domaines de test
DOMAIN="domain.tld" DOMAIN="domain.tld"
SUBDOMAIN="sub.$DOMAIN" SUBDOMAIN="sub.$DOMAIN"
# User de test
TEST_USER="package_checker" TEST_USER="package_checker"
[[ -e "./config" ]] && source "./config" [[ -e "./config" ]] && source "./config"
ARCH=${ARCH:-amd64}
DIST=${DIST:-buster}
# Yunohost version: stable, testing or unstable
YNH_BRANCH=${YNH_BRANCH:-stable}
LXC_BASE="ynh-appci-$DIST-$ARCH-$YNH_BRANCH-base" LXC_BASE="ynh-appci-$DIST-$ARCH-$YNH_BRANCH-base"
LXC_NAME="ynh-appci-$DIST-$ARCH-$YNH_BRANCH-test" LXC_NAME="ynh-appci-$DIST-$ARCH-$YNH_BRANCH-test"
YNH_BRANCH="-d $YNH_BRANCH"
readonly lock_file="./pcheck.lock" readonly lock_file="./pcheck.lock"