Hello,
Could someone please help me understand why the "hostname" (in bold) variable is not been passed to my << 'EOF' > file?
Thank you
Could someone please help me understand why the "hostname" (in bold) variable is not been passed to my << 'EOF' > file?
Code:
#!/bin/sh
#
hostname=$(hostname -f)
cat << 'EOF' > /etc/rc.conf
hostname="$hostname"
cron_flags=" -J 15"
# Disable Sendmail by default
sendmail_enable="NONE"
sendmail_submit_enable="NO"
sendmail_outbound_enable="NO"
sendmail_msp_queue_enable="NO"
# Run secure syslog
syslogd_flags="-c -ss"
# Enable IPv6
#ipv6_activate_all_interfaces="YES"
### Web Configuration
hiawatha_enable="YES"
php_fpm_enable="YES"
### Enable ssmpt at boot
ssmtp_enable="YES"
EOF