On Fri, Nov 1, 2013 at 1:56 PM, Reindl Harald h.reindl@thelounge.netwrote:
Am 01.11.2013 20:49, schrieb Wes James:
<snip>
Thanks. But why do some commands require service service-name command (like sshd) where postfix works without the service command in front of
it?
you still do not realize the difference between start/stop/restart and enable/disable a service, they *all* behave identically
some are enabled by default after install, some are not __________________________________
service *whatever* start service *whatever* restart service *whatever* stop
chkconfig *whatever* on chkconfig *whatever* off __________________________________
start/stop/restart acts *now* on/off acts at boot
please read some basic documentations!
http://www.linuxmail.info/how-to-start-stop-services-centos-6/
https://access.redhat.com/site/documentation/en-US/Red_Hat_Enterprise_Linux/...
I do understand that.
But why can you do
postfix stop/start
but not
sshd stop/start. With sshd you need to use service sshd stop/start. It seems inconsistent.
-wes
On Fri, Nov 1, 2013 at 3:02 PM, Wes James comptekki@gmail.com wrote:
But why can you do
postfix stop/start
but not
sshd stop/start. With sshd you need to use service sshd stop/start. It seems inconsistent.
If you are looking for consistency, you are in the wrong place. Linux distributions inherit random variations from 30+ years of different unix traditions plus whatever strangeness they each add to distinguish themselves. Sometimes different is better, sometimes it is just different.
On Fri, Nov 01, 2013 at 02:02:40PM -0600, Wes James wrote:
Please be careful with follow-ups. You are including Reindl in your replies and quoting his material back to the list when you do. He is not a member of this list and most of us would prefer to not see his commentary if at all possible.
Thank you.
John
On Fri, Nov 1, 2013 at 2:17 PM, John R. Dennison jrd@gerdesas.com wrote:
On Fri, Nov 01, 2013 at 02:02:40PM -0600, Wes James wrote:
Please be careful with follow-ups. You are including Reindl in your replies and quoting his material back to the list when you do. He is not a member of this list and most of us would prefer to not see his commentary if at all possible.
Thank you.
OK. Sorry.
-wes
On Nov 1, 2013 2:02 PM, "Wes James" comptekki@gmail.com wrote:
On Fri, Nov 1, 2013 at 1:56 PM, Reindl Harald <h.reindl@thelounge.net wrote:
Am 01.11.2013 20:49, schrieb Wes James:
<snip>
Thanks. But why do some commands require service service-name command (like sshd) where postfix works without the service command in front
of
it?
you still do not realize the difference between start/stop/restart and enable/disable a service, they *all* behave identically
some are enabled by default after install, some are not __________________________________
service *whatever* start service *whatever* restart service *whatever* stop
chkconfig *whatever* on chkconfig *whatever* off __________________________________
start/stop/restart acts *now* on/off acts at boot
please read some basic documentations!
http://www.linuxmail.info/how-to-start-stop-services-centos-6/
https://access.redhat.com/site/documentation/en-US/Red_Hat_Enterprise_Linux/...
I do understand that.
But why can you do
postfix stop/start
but not
sshd stop/start. With sshd you need to use service sshd stop/start. It seems inconsistent.
-wes _______________________________________________
Services are also executables. The name of the service and the name of the executable often but not always match. Utilities like `service` and `chkconfig` work with the init system to manage services. You can also invoke the executables by hand from the command line, but it would get tedious. The initscripts control the arguments an executable is given at start.
`service` is also an executable. It takes different arguments from other executables, primarily the name of the service to act on and the action to be taken. You don't expect different utilities to have identical command syntax, because they do different work.
https://access.redhat.com/site/documentation/en-US/Red_Hat_Enterprise_Linux/... this better than I have.
--pete
On 2013-11-01, Wes James comptekki@gmail.com wrote:
But why can you do
postfix stop/start
but not
sshd stop/start.
It is just the way Postfix and OpenSSH were written. The Postfix developers wanted one top-level executable to start their daemons (partly because there are more than one for Postfix). The OpenSSH developers did not (perhaps partly because there is only one real sshd process?).
With sshd you need to use service sshd stop/start. It seems inconsistent.
It is. As another poster commented, welcome to linux! Sometimes, if you read through the init script in /etc/init.d/, you can see how the actual service is called. That won't help with the inconsistency, but it might help in not having to remember which commands support the "start" argument and which do not.
--keith
On 11/1/2013 1:56 PM, Keith Keller wrote:
With sshd you need to use service sshd stop/start. It seems inconsistent.
It is. As another poster commented, welcome to linux! Sometimes, if you read through the init script in/etc/init.d/, you can see how the actual service is called. That won't help with the inconsistency, but it might help in not having to remember which commands support the "start" argument and which do not.
I'd go so far as to say you should ALWAYS use the service (or /etc/rc.d/init.d/$SERVICENAME) commands to do start/stop/reload/etc... the service script might be setting up environment variables, and/or running the commands with a specific set of parameters, which you might miss starting it manually
On Fri, 1 Nov 2013, Wes James wrote:
I do understand that.
But why can you do
postfix stop/start
but not
sshd stop/start. With sshd you need to use service sshd stop/start. It seems inconsistent.
The standard way to start and stop services on any Red Hat based Linux system is with service service-name stop/start/restart/whatever. Postfix is a special case in that you can do service postfix stop/start OR you can do postfix stop/start because the postfix author designed it that way. If you do not like the inconsistency then always use service postfix start/stop/restart, etc.
Postfix just has an optional way to stop and start it. It is that simple. In addition, using service postfix whatever has more options then simply start and stop. You can do any of the following: {start|stop|restart|reload|abort|flush|check|status|condrestart}. Run the command "service postfix" without any additional arguments to see an example.
Regards,