Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:12.3
uucp
sendmail-client.systemd
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File sendmail-client.systemd of Package uucp
#!/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 # pidfile=/var/spool/clientmqueue/sm-client.pid typeset -i timeout=1000 typeset -i port=25 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 fuser in /bin/fuser /usr/bin/fuser ; do test -x $fuser && break done for usleep in /bin/usleep /usr/bin/usleep ; do test -x $usleep && break done # # Make sure that configuration is uptodate # if test -x /usr/bin/make ; then /usr/bin/make -C /etc/mail > /dev/null 2>&1 fi # # Create /var/run/sendmail if not exit # test -d /var/run || /bin/mkdir --mode 0755 /var/run test -d /var/run/sendmail || /bin/mkdir --mode 1750 /var/run/sendmail # # Some default permissions # /bin/touch $pidfile /bin/chown mail:mail $pidfile /bin/chmod 0600 $pidfile # # Check for DaemonPortOptions # PortOpts=$($sed -rn '/^O[[:blank:]]+DaemonPortOptions=.*Name=MTA.*$/I { s/[[:blank:]]+//g s/^O[^=]+=(.*)/\1/p }' $cfg) # # Seek for port beside 25 aka smtp # for opt in ${PortOpts//,/ } ; do case "${opt%=*}" in [Pp]ort) port=${opt#*=} esac done unset opt # # Now wait that sendmail MTA is becoming ready # while ! $fuser -sn tcp $port > /dev/null 2>&1 ; do ((timeout-- <= 0)) && break $usleep 10000 done # # 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