alpine example: restart ssh server instead of rebooting
This commit is contained in:
parent
77411107c2
commit
cd0f72a7b6
|
@ -21,7 +21,6 @@ EOF
|
|||
boot_wait = "10s"
|
||||
}
|
||||
|
||||
|
||||
provisioner "shell" {
|
||||
inline = ["echo hi"]
|
||||
}
|
||||
|
|
|
@ -13,7 +13,11 @@ poweroff
|
|||
EOF
|
||||
chmod +x /usr/local/bin/shutdown
|
||||
|
||||
ifconfig eth0 up && udhcpc -i eth0
|
||||
|
||||
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 ?
|
||||
|
||||
/etc/init.d/sshd restart
|
|
@ -27,7 +27,6 @@ locals {
|
|||
"${var.alpine_password}<enter><wait>",
|
||||
"mount -t vfat /dev/fd0 /media/floppy<enter><wait>",
|
||||
"/media/floppy/alpine-setup.sh<enter>",
|
||||
"reboot<enter>",
|
||||
]
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue