Miredo is run as a server from the command line:
/usr/sbin/miredo
The man page says the signal SIGTERM stops the server.
How do I send SIGTERM to the server? Or SIGHUP, as I want to make a change to the config file.
And once I get this as I want it, how do I run it at system boot?
on 7-15-2008 12:33 PM Robert Moskowitz spake the following:
Miredo is run as a server from the command line:
/usr/sbin/miredo
The man page says the signal SIGTERM stops the server.
How do I send SIGTERM to the server? Or SIGHUP, as I want to make a change to the config file.
And once I get this as I want it, how do I run it at system boot?
You will have to make a sys V init script for it. You can probably use an existing script and edit it to suit your program, or there is example in /usr/share/doc/initscripts-xxxxxx directory that you should be able to hack at. That will also help you to get lock files and pid files going for it if you need them.
The other choice is to add a line to /etc/rc.d/rc.local, but that won't give you control with the system command.
Scott Silva wrote:
on 7-15-2008 12:33 PM Robert Moskowitz spake the following:
Miredo is run as a server from the command line:
/usr/sbin/miredo
The man page says the signal SIGTERM stops the server.
How do I send SIGTERM to the server? Or SIGHUP, as I want to make a change to the config file.
And once I get this as I want it, how do I run it at system boot?
You will have to make a sys V init script for it. You can probably use an existing script and edit it to suit your program, or there is example in /usr/share/doc/initscripts-xxxxxx directory that you should be able to hack at. That will also help you to get lock files and pid files going for it if you need them.
Thanks. Something else to learn. I have been trying to document all that I have been using (skipping what I have discarded, as I don't know if I know it).
It has pid files: /var/run/miredo.pid
How would I get lock files?
The other choice is to add a line to /etc/rc.d/rc.local, but that won't give you control with the system command.
I MUST include this in my docs. I keep forgetting the file name. This will probably be good enough, as once I get it working, it will be an auto start. And less effort than the first point.
CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
on 7-15-2008 1:05 PM Robert Moskowitz spake the following:
Scott Silva wrote:
on 7-15-2008 12:33 PM Robert Moskowitz spake the following:
Miredo is run as a server from the command line:
/usr/sbin/miredo
The man page says the signal SIGTERM stops the server.
How do I send SIGTERM to the server? Or SIGHUP, as I want to make a change to the config file.
And once I get this as I want it, how do I run it at system boot?
You will have to make a sys V init script for it. You can probably use an existing script and edit it to suit your program, or there is example in /usr/share/doc/initscripts-xxxxxx directory that you should be able to hack at. That will also help you to get lock files and pid files going for it if you need them.
Thanks. Something else to learn. I have been trying to document all that I have been using (skipping what I have discarded, as I don't know if I know it).
It has pid files: /var/run/miredo.pid
How would I get lock files?
You create lock files as a simple way to not run a process more than one at a time.
The other choice is to add a line to /etc/rc.d/rc.local, but that won't give you control with the system command.
I MUST include this in my docs. I keep forgetting the file name. This will probably be good enough, as once I get it working, it will be an auto start. And less effort than the first point.
Yes, rc.local will be easier to get the service running, but if you are creating something for distribution, service miredo restart can be easier for a noobie then kill -HUP (what was that pid# again?)
Scott Silva wrote:
on 7-15-2008 1:05 PM Robert Moskowitz spake the following:
Scott Silva wrote:
on 7-15-2008 12:33 PM Robert Moskowitz spake the following:
Miredo is run as a server from the command line:
/usr/sbin/miredo
The man page says the signal SIGTERM stops the server.
How do I send SIGTERM to the server? Or SIGHUP, as I want to make a change to the config file.
And once I get this as I want it, how do I run it at system boot?
You will have to make a sys V init script for it. You can probably use an existing script and edit it to suit your program, or there is example in /usr/share/doc/initscripts-xxxxxx directory that you should be able to hack at. That will also help you to get lock files and pid files going for it if you need them.
Thanks. Something else to learn. I have been trying to document all that I have been using (skipping what I have discarded, as I don't know if I know it).
It has pid files: /var/run/miredo.pid
How would I get lock files?
You create lock files as a simple way to not run a process more than one at a time.
I was asking how I make/control a lock file when the rpm provides a binary run module and the man page does not mention a lock file. How do I find out if there is a lock file? How do I get one working? Do I necessarily need one, perhaps the binary determines its running status before trying to start a second copy? Actually, I think I discovered that miredo will not start a second copy, oops.
The other choice is to add a line to /etc/rc.d/rc.local, but that won't give you control with the system command.
I MUST include this in my docs. I keep forgetting the file name. This will probably be good enough, as once I get it working, it will be an auto start. And less effort than the first point.
Yes, rc.local will be easier to get the service running, but if you are creating something for distribution, service miredo restart can be easier for a noobie then kill -HUP (what was that pid# again?)
Miredo comes from sourceforge. Fortunately, I do not have to create it.....
CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
On Tue, 2008-07-15 at 15:36 -0600, Robert Moskowitz wrote:
<snip>
How would I get lock files?
You create lock files as a simple way to not run a process more than one at a time.
I was asking how I make/control a lock file when the rpm provides a binary run module and the man page does not mention a lock file. How do I find out if there is a lock file? How do I get one working? Do I necessarily need one, perhaps the binary determines its running status before trying to start a second copy? Actually, I think I discovered that miredo will not start a second copy, oops.
If you still need to make a lockfile, it loocks like "man lockfile" might be what is needed. There are other ways using standard bash scripts (giving due consideration to possible race conditions), but lockfile looks like it might do nicely.
<snip>
HTH
on 7-15-2008 2:36 PM Robert Moskowitz spake the following:
Scott Silva wrote:
on 7-15-2008 1:05 PM Robert Moskowitz spake the following:
Scott Silva wrote:
on 7-15-2008 12:33 PM Robert Moskowitz spake the following:
Miredo is run as a server from the command line:
/usr/sbin/miredo
The man page says the signal SIGTERM stops the server.
How do I send SIGTERM to the server? Or SIGHUP, as I want to make a change to the config file.
And once I get this as I want it, how do I run it at system boot?
You will have to make a sys V init script for it. You can probably use an existing script and edit it to suit your program, or there is example in /usr/share/doc/initscripts-xxxxxx directory that you should be able to hack at. That will also help you to get lock files and pid files going for it if you need them.
Thanks. Something else to learn. I have been trying to document all that I have been using (skipping what I have discarded, as I don't know if I know it).
It has pid files: /var/run/miredo.pid
How would I get lock files?
You create lock files as a simple way to not run a process more than one at a time.
I was asking how I make/control a lock file when the rpm provides a binary run module and the man page does not mention a lock file. How do I find out if there is a lock file? How do I get one working? Do I necessarily need one, perhaps the binary determines its running status before trying to start a second copy? Actually, I think I discovered that miredo will not start a second copy, oops.
The other choice is to add a line to /etc/rc.d/rc.local, but that won't give you control with the system command.
I MUST include this in my docs. I keep forgetting the file name. This will probably be good enough, as once I get it working, it will be an auto start. And less effort than the first point.
Yes, rc.local will be easier to get the service running, but if you are creating something for distribution, service miredo restart can be easier for a noobie then kill -HUP (what was that pid# again?)
Miredo comes from sourceforge. Fortunately, I do not have to create it.....
Here is an easier option. http://dag.wieers.com/rpm/packages/miredo/
oops
Scott Silva wrote:
on 7-15-2008 2:36 PM Robert Moskowitz spake the following:
Scott Silva wrote:
on 7-15-2008 1:05 PM Robert Moskowitz spake the following:
Scott Silva wrote:
on 7-15-2008 12:33 PM Robert Moskowitz spake the following:
Miredo is run as a server from the command line:
/usr/sbin/miredo
The man page says the signal SIGTERM stops the server.
How do I send SIGTERM to the server? Or SIGHUP, as I want to make a change to the config file.
And once I get this as I want it, how do I run it at system boot?
You will have to make a sys V init script for it. You can probably use an existing script and edit it to suit your program, or there is example in /usr/share/doc/initscripts-xxxxxx directory that you should be able to hack at. That will also help you to get lock files and pid files going for it if you need them.
Thanks. Something else to learn. I have been trying to document all that I have been using (skipping what I have discarded, as I don't know if I know it).
It has pid files: /var/run/miredo.pid
How would I get lock files?
You create lock files as a simple way to not run a process more than one at a time.
I was asking how I make/control a lock file when the rpm provides a binary run module and the man page does not mention a lock file. How do I find out if there is a lock file? How do I get one working? Do I necessarily need one, perhaps the binary determines its running status before trying to start a second copy? Actually, I think I discovered that miredo will not start a second copy, oops.
The other choice is to add a line to /etc/rc.d/rc.local, but that won't give you control with the system command.
I MUST include this in my docs. I keep forgetting the file name. This will probably be good enough, as once I get it working, it will be an auto start. And less effort than the first point.
Yes, rc.local will be easier to get the service running, but if you are creating something for distribution, service miredo restart can be easier for a noobie then kill -HUP (what was that pid# again?)
Miredo comes from sourceforge. Fortunately, I do not have to create it.....
Here is an easier option. http://dag.wieers.com/rpm/packages/miredo/
I ment rpmforge which is how I access dag's stuff per the Centos wiki, giving me:
miredo-1.0.6-1.el5.rf.i386.rpm
So I am running it. I am now fighting with routing. All eth1 has is a Scope:Link address, yet ::/0 is has a metric of 1024 to it, while the Teredo route has a metric of 1029, so I am not getting to Teredo relay. Only can access other Teredo hosts over the Teredo interface. Something is not right yet:
route -A inet6 -n
Kernel IPv6 routing table Destination Next Hop Flags Metric Ref Use Iface 2001::/32 :: U 256 0 0 teredo fe80::/64 :: U 256 0 0 eth1 fe80::/64 :: U 256 0 0 teredo ::/0 fe80::a180:bc7:2364:5feb UGDA 1024 126 0 eth1 ::/0 :: U 1029 0 0 teredo ::1/128 :: U 0 0 1 lo 2001:0:53aa:64c:0:7741:b75b:47b9/128 :: U 0 0 1 lo fe80::ffff:ffff:ffff/128 :: U 0 0 1 lo fe80::21b:77ff:fe43:978/128 :: U 0 37 1 lo ff02::1/128 ff02::1 UC 0 1 0 eth1 ff02::2/128 ff02::2 UC 0 5 0 eth1 ff02::c/128 ff02::c UC 0 29 0 eth1 ff02::16/128 ff02::16 UC 0 33 0 eth1 ff02::fb/128 ff02::fb UC 0 114 0 eth1 ff02::1:2/128 ff02::1:2 UC 0 699 0 eth1 ff02::1:3/128 ff02::1:3 UC 0 2905 0 eth1 ff02::1:ff03:10a7/128 ff02::1:ff03:10a7 UC 0 1 0 eth1 ff02::1:ff10:497/128 ff02::1:ff10:497 UC 0 1 0 eth1 ff02::1:ff1d:a753/128 ff02::1:ff1d:a753 UC 0 1 0 eth1 ff02::1:ff3a:3dac/128 ff02::1:ff3a:3dac UC 0 1 0 eth1 ff02::1:ff64:5feb/128 ff02::1:ff64:5feb UC 0 41 0 eth1 ff02::1:ff7e:6072/128 ff02::1:ff7e:6072 UC 0 1 0 eth1 ff02::1:ffa0:4931/128 ff02::1:ffa0:4931 UC 0 3 0 eth1 ff02::1:ffa5:59cd/128 ff02::1:ffa5:59cd UC 0 3 0 eth1 ff02::1:ffef:fb68/128 ff02::1:ffef:fb68 UC 0 1 0 eth1 ff00::/8 :: U 256 0 0 eth1 ff00::/8 :: U 256 0 0 teredo
While you're at it, why not take a look at how Dag's version implements starting and stopping, and lock files (if it uses one) and learn from it.
Tony Schreiner
oops. A missend there a moment ago.
Tony Schreiner wrote:
While you're at it, why not take a look at how Dag's version implements starting and stopping, and lock files (if it uses one) and learn from it.
Nothing that I can find on lock files.
Starting is running the command miredo or miredo-server
Stopping is sending SIGTERM
NOW I remember: kill -s # pid
where pid is learned from /var/run/program.pid
......
Scott Silva wrote:
on 7-15-2008 12:33 PM Robert Moskowitz spake the following:
Miredo is run as a server from the command line:
/usr/sbin/miredo
The man page says the signal SIGTERM stops the server.
How do I send SIGTERM to the server? Or SIGHUP, as I want to make a change to the config file.
And once I get this as I want it, how do I run it at system boot?
You will have to make a sys V init script for it. You can probably use an existing script and edit it to suit your program, or there is example in /usr/share/doc/initscripts-xxxxxx directory that you should be able to hack at. That will also help you to get lock files and pid files going for it if you need them.
The other choice is to add a line to /etc/rc.d/rc.local, but that won't give you control with the system command.
CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
On Tue, 15 Jul 2008 13:33:41 -0600 Robert Moskowitz rgm@htt-consult.com took out a #2 pencil and scribbled:
Miredo is run as a server from the command line:
/usr/sbin/miredo
The man page says the signal SIGTERM stops the server.
How do I send SIGTERM to the server? Or SIGHUP, as I want to make a change to the config file.
If you want to terminate the process you can find the PID via 'ps aux' and issue the command 'kill -9 pidofprocess'. If you know the name of the process you may use 'killall -9 processname'.
SIGHUP I always call 'kill -HUP pidofprocess'. Or 'killall -HUP processname'.
SIGHUP will restart the process after it has died. Such as one does with gdm-binary when meeting some unfortunate driver issue and you want to restart the process rather than kill it off entirely.
And once I get this as I want it, how do I run it at system boot?
You could put it in /etc/rc.local
Simply append '/usr/sbin/miredo to the end of /etc/rc.local
HTH
Alex White
On Tue, Jul 15, 2008 at 15:54, Alex ethericalzen@gmail.com wrote:
If you want to terminate the process you can find the PID via 'ps aux' and issue the command 'kill -9 pidofprocess'. If you know the name of the process you may use 'killall -9 processname'.
Why the hell -9?
TERM is -15 and HUP is -1 (but I would stick to the names).
Using -9 is almost always the wrong answer. It's a last resort when everything else failed, and it should be reserved for such.
One should never use this command on a day-to-day basis, much less teach it or suggest it in a mailing list like this one.
Filipe
On Tue, 15 Jul 2008 16:25:17 -0400 "Filipe Brandenburger" filbranden@gmail.com took out a #2 pencil and scribbled:
On Tue, Jul 15, 2008 at 15:54, Alex ethericalzen@gmail.com wrote:
If you want to terminate the process you can find the PID via 'ps aux' and issue the command 'kill -9 pidofprocess'. If you know the name of the process you may use 'killall -9 processname'.
Why the hell -9?
TERM is -15 and HUP is -1 (but I would stick to the names).
Using -9 is almost always the wrong answer. It's a last resort when everything else failed, and it should be reserved for such.
One should never use this command on a day-to-day basis, much less teach it or suggest it in a mailing list like this one.
Filipe
You sir, are totally correct, I was thinking kill while reading TERM. I was going to go back and correct this, but saw it was already stated. So, yah. Don't run around killing processes like that.
I swear I'm not as dippy as I sound lol
Sincerely,
Alex White
On Tue, Jul 15, 2008 at 4:33 PM, Robert Moskowitz rgm@htt-consult.com wrote:
Miredo is run as a server from the command line:
/usr/sbin/miredo
The man page says the signal SIGTERM stops the server.
Supposing that miredo is a binary, you can:
killall -TERM miredo
If it's a script, I think the man page should tell you what to look for...
-- Marcelo
"¿No será acaso que ésta vida moderna está teniendo más de moderna que de vida?" (Mafalda)
On Tue, 2008-07-15 at 13:33 -0600, Robert Moskowitz wrote:
Miredo is run as a server from the command line:
/usr/sbin/miredo
The man page says the signal SIGTERM stops the server.
How do I send SIGTERM to the server? Or SIGHUP, as I want to make a change to the config file.
kill -TERM <PID> # or -HUP
You can also use the numeric equivalents. I forget them all but a man kill should lead you down the primrose path to total confusion! :-)
And once I get this as I want it, how do I run it at system boot?
I would suggest a look at /etc/rc.local or /etc/rc.d/rc.local might do. However, it runs late and so you may need to generate an init script, stick it in /etc/rc/init.d and provide an appropriately named symlink.
If you choose this method, read up on chkconfig et al.
<snip sig stuff>
HTH