Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Info

Теперь Вы можете запустить его в формате ./create_zone.sh <zone-name> <zone-ip-domain> <zone-ip-node> , например!:

./create_zone.sh zone02 192.168.0 3

...

Code Block
languagebash
cat > prepare.sh <<EOT
# by Denis Kozadaev
apt-get clean
apt-get autoclean
apt-get remove libiconv-dev -y

APTLIST="/tmp/apt_sources.list"
APTLISTETC="/etc/apt/sources.list"

echo "" > \$APTLIST
echo "deb [trusted=yes] http://192.168.0.3/dilos du2-prebuild main contrib non-free" >> \$APTLIST
echo "deb-src [trusted=yes] http://192.168.0.3/dilos du2-unstableprebuild main contrib non-free" 2>/dev/null >> \$APTLIST

mv \$APTLIST \$APTLISTETC

apt-get update -y
test -f /var/lib/dpkg/lock && rm -f /var/lib/dpkg/lock
test -f /var/cache/apt/archives/lock && rm -f /var/cache/apt/archives/lock
dpkg --configure -a
rm -rf \${WORKSPACE} && mkdir -p \${WORKSPACE}
apt-get upgrade -y
env DEBIAN_FRONTEND=noninteractive apt-get install -y -f
env DEBIAN_FRONTEND=noninteractive apt-get install -y git openssh-server oracle-jdk
EOT
chmod 777 ./prepare.sh

...