HEX
Server: Apache
System: Linux eisbus 6.8.12-9-pve #1 SMP PREEMPT_DYNAMIC PMX 6.8.12-9 (2025-03-16T19:18Z) x86_64
User: www-data (33)
PHP: 8.2.29
Disabled: NONE
Upload Files
File: //lib/inithooks/firstboot.d/09hostname
#!/bin/bash -e
# set hostname

. /etc/default/inithooks

[ -e $INITHOOKS_CONF ] && . $INITHOOKS_CONF

[ -z "$HOSTNAME" ] && exit 0

old=$(hostname)

for file in \
   /etc/exim4/update-exim4.conf.conf \
   /etc/printcap \
   /etc/hostname \
   /etc/hosts \
   /etc/network/interfaces \
   /etc/ssh/ssh_host_rsa_key.pub \
   /etc/ssh/ssh_host_dsa_key.pub \
   /etc/ssh/ssh_host_ecdsa_key.pub \
   /etc/ssh/ssh_host_ed25519_key.pub \
   /etc/mailname \
   /etc/postfix/main.cf \
   /etc/motd \
   /etc/ssmtp/ssmtp.conf
do
   [ -f $file ] && sed -i -e "s:$old:$HOSTNAME:g" $file
done

hostname $HOSTNAME

exit 0