packer-cn/examples/hcl/linux/etc/http/alpine-setup.sh

22 lines
422 B
Bash
Raw Normal View History

2020-07-13 06:31:20 -04:00
#!/bin/sh
set -ex
apk add libressl
apk add open-vm-tools
rc-update add open-vm-tools
/etc/init.d/open-vm-tools start
cat >/usr/local/bin/shutdown <<EOF
#!/bin/sh
poweroff
EOF
chmod +x /usr/local/bin/shutdown
sed -i "/#PermitRootLogin/c\PermitRootLogin yes" /etc/ssh/sshd_config
sed -i "/#PasswordAuthentication/c\PasswordAuthentication yes" /etc/ssh/sshd_config
mkdir ~/.ssh
# copy ssy key ?
2020-07-13 06:50:46 -04:00
/etc/init.d/sshd restart