Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:dspinella:zlib-ng-staging
sendmail
sendmail-client.systemd
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File sendmail-client.systemd of Package sendmail
#!/bin/bash # # /etc/mail/system/sm-client.pre # # Author: Werner Fink # Please send feedback to http://www.suse.de/feedback/ # # Description: # # Helper script to set up the environment for sendmail # Mail Transport Client if started by systemd # typeset -i timeout=1000 typeset port=smtp for cfg in /etc/sendmail.cf /etc/mail/sendmail.cf ; do test -s $cfg && break done for sed in /bin/sed /usr/bin/sed ; do test -x $sed && break done for usleep in /bin/usleep /usr/bin/usleep ; do test -x $usleep && break done # # Make sure that configuration is uptodate # test -x /usr/bin/make && /usr/bin/make -C /etc/mail > /dev/null 2>&1 # # Check for DaemonPortOptions # PortOpts=$($sed -rn '/^O[[:blank:]]+DaemonPortOptions=.*Name=MTA.*$/I { s/[[:blank:]]+//g s/^O[^=]+=(.*)/\1/p }' $cfg) unset sed cfg # # Seek for port beside 25 aka smtp # for opt in ${PortOpts//,/ } ; do case "${opt%=*}" in [Pp]ort) port=${opt#*=} break ;; esac done unset opt # # Now wait that sendmail MTA is becoming ready # Ping the bash special virtual file /dev/tcp/localhost/<port> # while exec 3>&2 2>&- < /dev/tcp/localhost/$port && break exec 2>&3 3>&- ((timeout-- <= 0)) && break $usleep 10000 do : done test -e /dev/fd/3 && exec 2>&3 3>&- unset port usleep timeout # # end of /etc/mail/system/sm-client.pre
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor