Compress vm.tar and update vmmgr config.json adminpwd init
This commit is contained in:
parent
7a19274211
commit
f16d2cde9b
@ -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
|
||||
|
5
vm.sh
5
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.old >/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.default.json >/mnt/etc/vmmgr/config.json
|
||||
ADMINPWD=$(htpasswd -bnBC 10 '' "${ENCPWD}" | tr -d ':\n' | sed 's/$2y/$2b/') envsubst </mnt/etc/vmmgr/config.json >/mnt/etc/vmmgr/config.json.new
|
||||
mv /mnt/etc/vmmgr/config.json.new /mnt/etc/vmmgr/config.json
|
||||
|
||||
# Cleanup
|
||||
rm -rf /mnt/root
|
||||
|
Loading…
Reference in New Issue
Block a user