2022-12-06 15:44:25 +01:00
|
|
|
#!/bin/sh
|
|
|
|
set -xeo pipefail
|
|
|
|
|
2023-06-27 15:25:30 +02:00
|
|
|
apk add --no-cache wget curl jq haveged ca-certificates rsyslog bash shadow
|
2022-12-06 15:44:25 +01:00
|
|
|
|
|
|
|
rc-update add haveged boot
|
|
|
|
rc-update add rsyslog boot
|
|
|
|
rc-update add sshd boot
|
|
|
|
|
|
|
|
# Generate root password
|
|
|
|
pass=$(openssl rand -base64 32 | tee -a .secret)
|
|
|
|
chmod 600 .secret
|
|
|
|
echo -e "${pass}\n${pass}" | passwd
|
|
|
|
|
|
|
|
# Remove expect package
|
|
|
|
|
|
|
|
# Prevent logs spamming like "process '/sbin/getty -L 0 ttyS0 vt100' (pid 2516) exited. Scheduling for restart."
|
|
|
|
# We don't need an access to ttyS0
|
|
|
|
sed -i 's@^\(ttyS0::respawn.*\)@#\1@' /etc/inittab
|
|
|
|
|
2023-06-27 15:25:30 +02:00
|
|
|
usermod --password $( echo "Cadoles;21" | openssl passwd -1 -stdin) root
|
|
|
|
|
2022-12-06 15:44:25 +01:00
|
|
|
sync
|