Skip to content

Instantly share code, notes, and snippets.

@drscream
Last active August 29, 2015 14:16
Show Gist options
  • Save drscream/3a479e5192fd1cdfe634 to your computer and use it in GitHub Desktop.
Save drscream/3a479e5192fd1cdfe634 to your computer and use it in GitHub Desktop.
#!/usr/bin/bash
## Load configuration information from USBKey
. /lib/svc/share/smf_include.sh
. /lib/sdc/config.sh
load_sdc_sysinfo
load_sdc_config
## Set the PATH environment because of other commands in /usr
PATH=/usr/bin:/usr/sbin:${PATH}
## Sendmail configuration for SmartHost setup
if [[ ${CONFIG_mail_smarthost} ]]; then
cp /etc/mail/{submit.cf,sendmail.cf} /tmp/
sed "s:^DS.*:DS[${CONFIG_mail_smarthost}]:g" /tmp/submit.cf > /etc/mail/submit.cf
sed "s:^DS.*:DS[${CONFIG_mail_smarthost}]:g" /tmp/sendmail.cf > /etc/mail/sendmail.cf
svcadm refresh sendmail-client
svcadm refresh sendmail
fi
rm /etc/mail/default-auth-info*
exit $SMF_EXIT_OK
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment