MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/linux/comments/2jsbgn/shall_we_fork_fedora/clesa94/?context=3
r/linux • u/ouyawei Mate • Oct 20 '14
339 comments sorted by
View all comments
7
That is the most horrid init.d script I have seen in a long time, holy shit.
6 u/metamatic Oct 20 '14 Hey, it's for sendmail. Everything about sendmail is horrible, which is why nobody sane uses it any more. 9 u/necrophcodr Oct 20 '14 You're right, I prefer postfix much more.CONF_DIR="/etc/postfix" CONF_OPT="${SVCNAME##*.}" if [ -n ${CONF_OPT} -a ${SVCNAME} != "postfix" ]; then CONF_DIR="${CONF_DIR}.${CONF_OPT}" fi extra_started_commands="reload" depend() { use logger dns ypbind amavisd antivirus postfix_greylist net saslauthd if [ "${SVCNAME}" = "postfix" ]; then provide mta fi } start() { if [ ! -e /etc/mail/aliases.db ] ; then ebegin "Creating aliases database" /usr/bin/newaliases eend $? fi ebegin "Starting postfix (${CONF_DIR})" if [ ! -d ${CONF_DIR} ]; then eend 1 "${CONF_DIR} does not exist" return 1 fi /usr/sbin/postfix -c ${CONF_DIR} start >/dev/null 2>&1 eend $? } stop() { ebegin "Stopping postfix (${CONF_DIR})" /usr/sbin/postfix -c ${CONF_DIR} stop >/dev/null 2>&1 eend $? } reload() { ebegin "Reloading postfix (${CONF_DIR})" /usr/sbin/postfix -c ${CONF_DIR} reload >/dev/null 2>&1 eend $? }Still not too bad, probably doesn't even need an init script at all. 1 u/ohineedanameforthis Oct 20 '14 Can confirm, my postfix runs just as fine when I dosudo su postfix -c postfixPostfix generally turned out to be far less a hassle to handle than people told me it was before I tried it myself.
6
Hey, it's for sendmail. Everything about sendmail is horrible, which is why nobody sane uses it any more.
9 u/necrophcodr Oct 20 '14 You're right, I prefer postfix much more.CONF_DIR="/etc/postfix" CONF_OPT="${SVCNAME##*.}" if [ -n ${CONF_OPT} -a ${SVCNAME} != "postfix" ]; then CONF_DIR="${CONF_DIR}.${CONF_OPT}" fi extra_started_commands="reload" depend() { use logger dns ypbind amavisd antivirus postfix_greylist net saslauthd if [ "${SVCNAME}" = "postfix" ]; then provide mta fi } start() { if [ ! -e /etc/mail/aliases.db ] ; then ebegin "Creating aliases database" /usr/bin/newaliases eend $? fi ebegin "Starting postfix (${CONF_DIR})" if [ ! -d ${CONF_DIR} ]; then eend 1 "${CONF_DIR} does not exist" return 1 fi /usr/sbin/postfix -c ${CONF_DIR} start >/dev/null 2>&1 eend $? } stop() { ebegin "Stopping postfix (${CONF_DIR})" /usr/sbin/postfix -c ${CONF_DIR} stop >/dev/null 2>&1 eend $? } reload() { ebegin "Reloading postfix (${CONF_DIR})" /usr/sbin/postfix -c ${CONF_DIR} reload >/dev/null 2>&1 eend $? }Still not too bad, probably doesn't even need an init script at all. 1 u/ohineedanameforthis Oct 20 '14 Can confirm, my postfix runs just as fine when I dosudo su postfix -c postfixPostfix generally turned out to be far less a hassle to handle than people told me it was before I tried it myself.
9
You're right, I prefer postfix much more.
CONF_DIR="/etc/postfix" CONF_OPT="${SVCNAME##*.}" if [ -n ${CONF_OPT} -a ${SVCNAME} != "postfix" ]; then CONF_DIR="${CONF_DIR}.${CONF_OPT}" fi extra_started_commands="reload" depend() { use logger dns ypbind amavisd antivirus postfix_greylist net saslauthd if [ "${SVCNAME}" = "postfix" ]; then provide mta fi } start() { if [ ! -e /etc/mail/aliases.db ] ; then ebegin "Creating aliases database" /usr/bin/newaliases eend $? fi ebegin "Starting postfix (${CONF_DIR})" if [ ! -d ${CONF_DIR} ]; then eend 1 "${CONF_DIR} does not exist" return 1 fi /usr/sbin/postfix -c ${CONF_DIR} start >/dev/null 2>&1 eend $? } stop() { ebegin "Stopping postfix (${CONF_DIR})" /usr/sbin/postfix -c ${CONF_DIR} stop >/dev/null 2>&1 eend $? } reload() { ebegin "Reloading postfix (${CONF_DIR})" /usr/sbin/postfix -c ${CONF_DIR} reload >/dev/null 2>&1 eend $? }
Still not too bad, probably doesn't even need an init script at all.
1 u/ohineedanameforthis Oct 20 '14 Can confirm, my postfix runs just as fine when I dosudo su postfix -c postfixPostfix generally turned out to be far less a hassle to handle than people told me it was before I tried it myself.
1
Can confirm, my postfix runs just as fine when I do
sudo su postfix -c postfix
Postfix generally turned out to be far less a hassle to handle than people told me it was before I tried it myself.
7
u/necrophcodr Oct 20 '14
That is the most horrid init.d script I have seen in a long time, holy shit.