From f16d2cde9bb7a6d838f18f4d6ba5dd397c06da57 Mon Sep 17 00:00:00 2001 From: Disassembler Date: Fri, 13 Mar 2020 00:19:00 +0100 Subject: [PATCH] Compress vm.tar and update vmmgr config.json adminpwd init --- build/build-all.sh | 2 +- vm.sh | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/build/build-all.sh b/build/build-all.sh index 7b0f44a..348f082 100755 --- a/build/build-all.sh +++ b/build/build-all.sh @@ -9,7 +9,7 @@ make html # Build basic tar cd ${ROOT}/vm -tar cpf /srv/build/vm.tar * +tar czpf /srv/build/vm.tar.gz * # Build native apps cd ${ROOT}/apk/geos diff --git a/vm.sh b/vm.sh index 36422d4..5a5764b 100755 --- a/vm.sh +++ b/vm.sh @@ -86,14 +86,15 @@ chroot /mnt setup-timezone -z Europe/Prague # Install basic system apk --no-cache add apache2-utils gettext -wget https://repo.spotter.cz/vm.tar -O - | tar xf - -C /mnt +wget https://repo.spotter.cz/vm.tar.gz -O - | tar xzf - -C /mnt envsubst /mnt/boot/extlinux.conf chroot /mnt apk --no-cache add bridge ca-certificates curl e2fsprogs-extra gettext iptables kbd-misc logrotate postfix nginx openssh-server openssh-sftp-server util-linux wireguard-virt wireguard-tools-wg spoc@vm vmmgr@vm chroot /mnt newaliases for SERVICE in consolefont crond iptables networking nginx ntpd postfix spoc swap urandom vmmgr; do ln -s /etc/init.d/${SERVICE} /mnt/etc/runlevels/boot done -ADMINPWD=$(htpasswd -bnBC 10 '' "${ENCPWD}" | tr -d ':\n' | sed 's/$2y/$2b/') envsubst /mnt/etc/vmmgr/config.json +ADMINPWD=$(htpasswd -bnBC 10 '' "${ENCPWD}" | tr -d ':\n' | sed 's/$2y/$2b/') envsubst /mnt/etc/vmmgr/config.json.new +mv /mnt/etc/vmmgr/config.json.new /mnt/etc/vmmgr/config.json # Cleanup rm -rf /mnt/root