[Slackbuilds-users] rc.postfix

Nishant Limbachia nishant at mnspace.net
Wed Feb 20 14:00:00 UTC 2013


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 02/20/2013 04:41 AM, Eugen Wissner wrote:
> Hi,
>
> rc.6 which is executed during shutdown/reboot sets
> PATH=/sbin:/etc:/bin:/usr/bin. If I want to stop postfix automatically in
> rc.6 or rc.local_shutdown I get an error "postfix can't be found" because
> postfix is in /usr/sbin. Wouldn't it be better to write the full path in
> rc.postfix:
>
> postfix_start()
> {
> /usr/sbin/postfix start
> }
>
> postfix_stop()
> {
> /usr/sbin/postfix stop
> }
> ?
>
> Best regards
> Eugene
>
>
>
> _______________________________________________
> SlackBuilds-users mailing list
> SlackBuilds-users at slackbuilds.org
> http://lists.slackbuilds.org/mailman/listinfo/slackbuilds-users
> Archives - http://lists.slackbuilds.org/pipermail/slackbuilds-users/
> FAQ - http://slackbuilds.org/faq/
>
I had the same issue and so instead of changing rc.6, I changed
rc.postfix to include full path to postfix binary.  Postfix also
supports 'status' command from version 2.9.x, I believe.  Here's the
diff of rc.postfix I use on my system that is the enhanced version of
the one on SBo.

Thanks,

- -- 
Nishant Limbachia
nishant at mnspace.net
GPG Key: 0x0FF9D6D5
GPG Fingerprint: CC77 2954 DBDD CA46 49D5 BC90 786E 5DA2 0FF9 D6D5
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iEYEARECAAYFAlEk1uAACgkQeG5dog/51tWJbgCfYv/2f1PSJCVr9WOCx0L2Gd09
6NwAnjBRVFYBUSChyfcJI+Ty5tpuukzU
=SlMb
-----END PGP SIGNATURE-----

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.slackbuilds.org/pipermail/slackbuilds-users/attachments/20130220/e5b0acff/attachment.html>
-------------- next part --------------
--- rc.postfix.SBo	2013-02-20 07:49:55.619007506 -0600
+++ rc.postfix	2013-02-20 07:49:12.753540045 -0600
@@ -22,12 +22,12 @@
 
 postfix_start()
 {
-  postfix start
+  /usr/sbin/postfix start
 }
 
 postfix_stop()
 {
-  postfix stop
+  /usr/sbin/postfix stop
 }
 
 postfix_restart()
@@ -38,7 +38,12 @@
 
 postfix_reload()
 {
-  postfix reload
+  /usr/sbin/postfix reload
+}
+
+postfix_status()
+{
+  /usr/sbin/postfix status
 }
 
 case $1 in
@@ -54,6 +59,9 @@
 'reload')
   postfix_reload
   ;;
+'status')
+  postfix_status
+  ;;
 *)
-  echo "usage $0 start|stop|restart|reload"
+  echo "usage $0 start|stop|restart|reload|status"
 esac


More information about the SlackBuilds-users mailing list