Please check out Corporate Expanse: From the Cradle !

Member Discussions

terms



[Previous] [Next] [Post] [Reply] [Topics] [Summary] [Search]


1. Rebooting the Mud from another Port Thu Mar 13, 2008 [12:18 PM]
807
robby_burney@yahoo.com
member since: Mar 16, 2005
Reply
Hey, I need a little help with this command namely because I can't think about how I can really go about it. I'm trying to setup a command that will allow me to reboot my mud from a different port (should my main port go down, there are two other ports one of my immortals could reboot the main mud from WITHOUT giving them shell access).

Now, I've considered that I could use bash script to work this through but I don't know how to phrase "If the startup script is already running or if the mud is already running, return."

So basically, could someone either send me an example of how code like this would operate (I would then recode it in my own way, but it's nice to see it working) or give me a quick run through on how to phrase the line above? I would appreciate either. If you send over code, perhaps we could trade... Thanks in advance,

Robby


2. RE: Rebooting the Mud from another Port Thu Mar 13, 2008 [2:27 PM]
mann_jess
Email not supplied
member since: Dec 10, 2005
In Reply To
Reply
Well, that depends entirely on how your normal startup script determines if the process is running. That will vary by codebase, I suppose.

If you're writing a bash script, you could always just issue a ps to check for the MUD. Something like this:

#!/bin/bash

if [ ! "$(ps -ef | grep mudname | grep portnumber grep -v grep)" ]
then
startup_the_mud
fi

Obviously, you would replace startup_the_mud with your startup command, mudname with the process name, and portnumber with the port number you're checking against.

However, there are better ways of handling it than issuing a ps. For example, writing a pid file every time the MUD is started up. Then, you can grab the pidfile and check if that pid is running, or assume it's not if there's not a file.

Anyway, the latter shouldn't be necessary (though it's better practice).

Hope that answers your question.

Best of Luck,
-Jess

(Comment added by mann_jess on Thu Mar 13 19:26:58 2008)

By the way, I forgot a pipe in the original script I posted. Instead, it would be something like this:
if [ ! "$(ps -ef | grep mudname | grep portnumber | grep -v grep)" ]

Obviously, still replacing "mudname" and "portnumber" appropriately.

Best of Luck,
-Jess


3. RE: Rebooting the Mud from another Port Thu Mar 13, 2008 [2:32 PM]
mann_jess
Email not supplied
member since: Dec 10, 2005
In Reply To
Reply
By the way... google is your friend. Typing "bash check if a process is running" returns a good million results. The whole of the first page looks very useful, so you can take your pick.

Google is *-always-* the first place I go when I have a question. Unless, I suppose, It's something about astrophysics and I happen to have an astrophysicist in the room, or something. Otherwise, google is my bff, with an extra b and f.

Best of Luck,
-Jess


4. RE: Rebooting the Mud from another Port Thu Mar 13, 2008 [3:32 PM]
Lobotomy
Email not supplied
member since: May 25, 2007
In Reply To
Reply
By the way... google is your friend.

Googling for answers is usually quick and effective. However, the attitude that people should resist asking for help and advice here on TMC simply on the basis of being able to find an answer somewhere else is self-defeating and wrong, in my opinion. If for nothing else, it is detrimental to the community aspect of TMC.

It's interesting to be able to discuss various aspects of Mu* design with other developers. After all, one of the aspects failing a google search is that Google is not specificly geared towards Mu* design. We are, however. Why shouldn't people want to tap such a readily available resource as TMC that is already geared towards the desired information?

The people involved intitially or as of current are not always the people being helped by having these discussions, you should bear in mind. There are any number of future readers who can and will come across TMC, for various reasons potentially including the source of this thread. Even having such discussions which might seem frivolous or unneccessary could even be helping the visibility of this community to the rest of the world by providing more chances for a source here to match someone's web search.

Furthermore, it's annoying to be told to look elsewhere instead of "bothering" the people here with those questions. Do you stop to consider why it bothers you that this guy decided to ask the question here instead of (by your assumption) googling the problem first? Who is forcing you to respond to it, anyways?

Personally, I would prefer that people not be coerced into feeling that they should only discuss issues here as a last resort.
FreeMUD - A Python 3 MUD codebase: http://sourceforge.net/projects/freemud/


5. RE: Rebooting the Mud from another Port Thu Mar 13, 2008 [4:44 PM]
synorel
Email not supplied
member since: Mar 13, 2002
In Reply To
Reply
He was trying to be helpful and give him a broader search range in case he had little luck here, or knew more specifically what he needed without being able to communicate that to us.

Your inventing allot of the attitude your responding to. If you dont like it, dont post. No need to be an *CENSORED*.

Helping people is great, doing everything for them defeats the purpose of help. Getting them started, and pointing them in a good direction is fine.

-Syn
-Crash the silence for the sake of memory

Intrinsic Realities, Owner, Coder


6. RE: Rebooting the Mud from another Port Thu Mar 13, 2008 [5:16 PM]
mann_jess
Email not supplied
member since: Dec 10, 2005
In Reply To
Reply
Do you stop to consider why it bothers you that this guy decided to ask the question here instead of (by your assumption) googling the problem first? Who is forcing you to respond to it, anyways?

WTF? Where'd that come from? A guy asked a question. I answered the question. Then, I followed up by explaining where he could find further explanation. Now, I'm getting attitude from someone else for being a jerk?

Huh? --- I guess it serves me right for being helpful. Thanks.

Anyway... Even if we assume, for a second, that I did imply anywhere that I was pissed off at him for wasting my time (which is a pretty broad leap, I think), there *are* good reasons why people suggest to RTFM or JFGI before asking on a forum. It's the same reason that your math teacher in school isn't always going to just ~-tell you-~ the answer to every problem, and that your mom isn't just going to provide you an allowance of $3700 per month for the rest of your life. Instead, they teach you how to do it, so you can become self reliant. One day, your mother will die, or your math teacher will retire, or forum posters won't reply to your thread... and that'll be all you have.

There was a time in my life too when I didn't know how to use google very effectively, just as there was a time I couldn't add. One day, with the help of whomever, I must have figured it out, and now I can solve problems on my own. Isn't that a wonderful feeling?

I don't think the OP should be spoon fed for the rest of his life, and frankly, I don't think he *wants to be* either. He seems pretty self sufficient, insofar as he is able to figure out the rest of the script besides that one statement, and I applaud him for that.

There's a difference between holding someone's hand and teaching them something. My aim was to teach him something, and frankly, I think I did it in just about the nicest way possible.

Thanks though. Sheesh.

OP - Please don't be offended. This has nothing to do with you.

Best of Luck,
-Jess


7. RE: Rebooting the Mud from another Port Thu Mar 13, 2008 [6:06 PM]
Lobotomy
Email not supplied
member since: May 25, 2007
In Reply To
Reply
Your inventing allot of the attitude your responding to.

I disagree, on the basis of seeing other post(s) in recent times that reflect the same or similar attitude (example).

If you dont like it, dont post.

You should be aware that I do practice that particular tenet far more often than not. There are merely a select few instances, such as this one, where I feel the need to say anything. You, on the other hand, have lately been running off at the mouth at several posts you have problems with. Do you really believe you have the grounds to be giving me that sort of advice in light of that?

Then, I followed up by explaining where he could find further explanation. Now, I'm getting attitude from someone else for being a jerk?

In earlier years, the assumption that some people on the internet are not familiar with Google and how, why, or when to use it would have more merit. Nowadays, especially with regards to people who are apparently computer-savvy enough to use a web browser (which are usually integrated with a Google search function by default, no less), that sort of assumption is a bit dated, if not offending, to make.

Your original response was great. Why couldn't it have just been left at that?
FreeMUD - A Python 3 MUD codebase: http://sourceforge.net/projects/freemud/


8. RE: Rebooting the Mud from another Port Thu Mar 13, 2008 [6:20 PM]
mann_jess
Email not supplied
member since: Dec 10, 2005
In Reply To
Reply
Your original response was great. Why couldn't it have just been left at that?

Whatever, dude.

The other thread you reference is another prime example of the poster getting a good amount of help. That you seem to have some aversion to anyone mentioning the name 'google' seems a bit odd to me. But hey, it's your thing.

I didn't yell at him. I didn't use any profanity or harsh language. I didn't say, or imply, that he was wasting my time. Nor did I tell him to look it up next time before coming here. I was polite, reserved, and helpful.

That you prefer to "help" people by spoon feeding them information without explaining where that information comes from, or giving them the tools necessary to become self reliant, is on you. Don't try to tell me I'm a jerk because I don't subscribe to that skewed perception of teaching.

Thanks,
-Jess


9. RE: Rebooting the Mud from another Port Thu Mar 13, 2008 [6:31 PM]
Lorial
Email not supplied
member since: Oct 17, 2005
In Reply To
Reply
A quote, attributed to Lao Tsu, Kwan-Tzu, anonymous and others, applies:

"Give a man a fish and you feed him for a day. Teach him how to fish and you feed him for a lifetime."

Giving an answer, a secondary answer and being helpful enough to suggest the availability of further resources is not "running off at the mouth". It is likely the most helpful way a person can foster an intelligent community.

I learned something from the answer that I did not know, but the part about googling I know. To search for answers is one tool in a (hopefully) varied and expanding coder's toolbox.

Smile.
-Lorial
Builder and Coder
"No Ocean too High, No Mountain too Deep"


10. RE: Rebooting the Mud from another Port Thu Mar 13, 2008 [7:32 PM]
Lobotomy
Email not supplied
member since: May 25, 2007
In Reply To
Reply
Whatever, dude.

I compliment the helpful post you made and I get cynicism in return. Spectacular.

The other thread you reference is another prime example of the poster getting a good amount of help.

...after being initially mocked by Zeno for not using Google to answer his question beforehand. It's the same condescending attitude I see coming from you.

I didn't say, or imply, that he was wasting my time. Nor did I tell him to look it up next time before coming here.

If that is the case, then why are you making statements like "Google is *-always-* the first place I go when I have a question." which basicly equates to "I'm smart enough to use Google before asking a question. Why aren't you?"

That you prefer to "help" people by spoon feeding them information without explaining where that information comes from, or giving them the tools necessary to become self reliant, is on you.

Your base assumption on how I help people aside, I find your definition of self reliance interesting. Google is nothing more than a tool used to find information sources other people have put up. You're not making him any more "self reliant" by telling him to look somewhere else; it's just shifting the burden of helping him to someone or something else. If anything, it's to make him "Google reliant".

Don't try to tell me I'm a jerk because I don't subscribe to that skewed perception of teaching.

I have yet to try and tell you that you're a jerk, nor do I feel the need to. I'm simply saying your second post was unneccessary.

Giving an answer, a secondary answer and being helpful enough to suggest the availability of further resources is not "running off at the mouth".

It sounds like you're confusing my response to what Synorel said as being towards Mann_jess, which it wasn't.

As for your quote regarding the "teach a man to fish" concept, there is a key factor to consider which causes such a concept to become out of place: You're trying to teach a man to fish that is likely to already know how. If the OP was somehow completely oblivious to the existence of Google before Mann_jess's attempt to help him use it, then I will retract what I've said. However, telling people to use Google on the internet these days is a condescending slap in the face more often than not.
FreeMUD - A Python 3 MUD codebase: http://sourceforge.net/projects/freemud/


11. RE: Rebooting the Mud from another Port Thu Mar 13, 2008 [9:52 PM]
807
robby_burney@yahoo.com
member since: Mar 16, 2005
In Reply To
Reply
Dude :P Thanks for the answer btw. And chill out guys, it's not a big deal. He was being helpful in suggesting google. I did run a google search first but it wasn't a very rewarding experience so I figured you guys were a good second bet. Anyway, next time don't jump down each other's throats. Go play Lothlorien if you want to do that ;)

Thanks again,
Robby


12. RE: Rebooting the Mud from another Port Thu Mar 13, 2008 [10:27 PM]
mann_jess
mann_jess@yahoo.com
member since: Dec 10, 2005
In Reply To
Reply
I compliment the helpful post you made and I get cynicism in return. Spectacular.

Ha! I help a guy that asks, and someone entirely alien to the discussion jumps on me for providing too much information. Now that somebody is telling me I'm the one with trouble taking praise and advice. Beautiful!

If that is the case, then why are you making statements like "Google is *-always-* the first place I go when I have a question." which basicly equates to "I'm smart enough to use Google before asking a question. Why aren't you?"

It doesn't even *begin* to equate to that, any more than a school teacher, who explains to a student how to carry a 1 when adding is being condescending! I don't know where you're getting this, but these implications you're seeing are contrived, not found.

...after being initially mocked by Zeno for not using Google to answer his question beforehand...

And this is a perfect example. Zeno *mentioned* google. That's it. The word came up. That's not mocking! What aversion do you have to google, anyway? Let's say a math student asks for advice on solving a math problem, and someone responds "Well, computing the integral, I get ...". Is he mocking the OP by mentioning how he arrived at the answer? Most *certainly* not! "Google" is not a mocking term any more than "integral" is.

You're not making him any more "self reliant" by telling him to look somewhere else;

With that logic, self reliance is impossible. The sum of human knowledge has been documented by someone, somewhere, and that's what we learn from. The question he asked has been asked thousands of other times --already--. Even using your perception of things (which I might add is a bit flawed), I would not have been telling him to go try another forum, or ask someone else. Instead, I would have been telling him to look it up in *existing* documentation. Searching on google *using his keywords* turns up a million hits. Checking the first two pages, I didn't come across a single result that didn't seem as though it would fully answer the question. If using those 20-1,000,000 resources is not self reliance, then neither is reading a book, nor asking a question, nor even using prior knowledge you have on other subjects to solve the problem yourself. No. Self reliance doesn't mean "not using any tools". Self reliance means figuring something out without having someone else do it for you.

If anything, it's to make him "Google reliant".

Just like a carpenter is hammer reliant, and I am brain reliant. What could possibly possess you to think that using a particular tool, which is well suited for the job I might add, is a bad thing?

I'm simply saying your second post was unneccessary.

Well. Since, had he typed his post into google instead of into this forum, he would have found the result in seconds, I feel inclined to disagree. In fact, had he used google first, he wouldn't have posted his question here, so I don't think it's unnecessary at all!

By the way... I feel inclined to note that ones ability to use google properly is directly impacted by his ability to describe a problem adequately, with the appropriate terminology. You'll note that I didn't say "Hey, try google first next time!", but instead replied with a specific set of keywords I would have used, which in turn would supply him with a vast array of resources in addition to my post. If anything, the terminology was half the comment, and probably the most useful thing I mentioned in either of my replies.

Lobotomy, I don't know what your deal is with this... but I was genuinely trying to help a guy that asked for help. In doing so, I provided an answer to his question, and an explanation on how I would have (self reliantly) arrived at that answer were I in his shoes. With that knowledge, he can now go off and fix his problem, and optionally use the resources I provided for further reading. I was in no way hostile, or condescending in *any* way. In fact, I recall telling a few (very lame) jokes in those replies to boot!

If you take issue with that, then it's your issue to bear. I don't know how else I can explain it. Seriously... you need to back off. Jumping at someone who has been courteous and helpful is outright rude, and it's not something I'm particularly fond of. If you have an issue with me, then take it to a thread that is already uselessly consumed by flaming and discussion (I'm a part of many, I assure you). I'll happily discuss whatever you want there.

Again, OP, please don't take our bickering as any reflection of you or your question. There was nothing wrong with either. If you need any other help, feel free to send me an email (above).

Best of Luck,
-Jess


13. RE: Rebooting the Mud from another Port Thu Mar 13, 2008 [11:04 PM]
Lobotomy
Email not supplied
member since: May 25, 2007
In Reply To
Reply
mann_jess said:
Well. Since, had he typed his post into google instead of into this forum, he would have found the result in seconds, I feel inclined to disagree. In fact, had he used google first, he wouldn't have posted his question here, so I don't think it's unnecessary at all!

The OP said:
I did run a google search first but it wasn't a very rewarding experience so I figured you guys were a good second bet.

Huzzah! I'm out. Good luck with the project, 807.
FreeMUD - A Python 3 MUD codebase: http://sourceforge.net/projects/freemud/


14. RE: Rebooting the Mud from another Port Thu Mar 13, 2008 [11:10 PM]
mann_jess
Email not supplied
member since: Dec 10, 2005
In Reply To
Reply
Lobotomy,

Yes. I saw his post before responding fully to yours. You'll notice that in addition to your quote of mine, I *also* said.

I... replied with a specific set of keywords I would have used, which in turn would supply him with a vast array of resources in addition to my post. If anything, the terminology was half the comment, and probably the most useful thing I mentioned in either of my replies.


If you don't get that, then that's your loss. Seriously, dude.... If you're going to jump down someone's throat, at least attack someone that isn't responding helpfully to a genuine question. There are enough flames here to keep more than busy with that kind of behavior. Go bother "Mistery Letter". He relishes in it.

Best of Luck,
-Jess


15. RE: Rebooting the Mud from another Port Thu Mar 13, 2008 [11:48 PM]
synorel
Email not supplied
member since: Mar 13, 2002
In Reply To
Reply

I compliment the helpful post you made and I get cynicism in return. Spectacular.



No you answered a helpful post with cynicism like a total *CENSORED*. Spectacular.

-Syn
-Crash the silence for the sake of memory

Intrinsic Realities, Owner, Coder


16. RE: Rebooting the Mud from another Port Fri Mar 14, 2008 [12:12 AM]
Drizzt1216
Email not supplied
member since: Aug 12, 2005
In Reply To
Reply

or forum posters won't reply to your thread... and that'll be all you have.


Like that'll happen, no one can resist to replying to my blatant trolling!
Builder Academy:
http://www.tbamud.com
telnet://www.tbamud.com:9091
4 Dimensions:
http://www.4dimensions.org
telnet://www.4dimensions.org:6000


17. RE: Rebooting the Mud from another Port Fri Mar 14, 2008 [1:40 AM]
Samson
Email not supplied
member since: Jul 24, 1999
In Reply To
Reply
.... must .... not .... reply.... DOH!
SmaugMuds.org: http://www.smaugmuds.org
My Blog. Leave your political correctness at the door: http://www.iguanadons.net


18. RE: Rebooting the Mud from another Port Fri Mar 14, 2008 [7:50 AM]
cratylus
Email not supplied
member since: Feb 1, 2006
In Reply To
Reply
AFAIK mann_jess is one of the most consistently non-evil
people here, so leaping on this (truly blameless) comment
about googling seems risible.

If I find fault with mann_jess, it's in being *so*
accommodating of the opposing view that ridiculous
premises are accepted as valid for the purposes of
debate, thus enhancing the legitimacy of the foolish.

The idea that that mann_jess was wrong for suggesting
the OP avail himself of Google is *ridiculous*.

Basing that judgment on a slew of assumptions of
(unarticulated , undetectable, and non sequitur)
malicious intent is *unreasonable*.

And getting up on a high horse about others harming
the "community" while you yourself are initiating
utterly pointless infighting over trivia is something
I've come to regard as *Lobotomy*.

-Crat
http://lpmuds.net


19. RE: Rebooting the Mud from another Port Fri Mar 14, 2008 [3:11 PM]
Lobotomy
Email not supplied
member since: May 25, 2007
In Reply To
Reply
AFAIK mann_jess is one of the most consistently non-evil
people here, so leaping on this (truly blameless) comment
about googling seems risible.

If I find fault with mann_jess, it's in being *so*
accommodating of the opposing view that ridiculous
premises are accepted as valid for the purposes of
debate, thus enhancing the legitimacy of the foolish.

The idea that that mann_jess was wrong for suggesting
the OP avail himself of Google is *ridiculous*.

Basing that judgment on a slew of assumptions of
(unarticulated , undetectable, and non sequitur)
malicious intent is *unreasonable*.

And getting up on a high horse about others harming
the "community" while you yourself are initiating
utterly pointless infighting over trivia is something
I've come to regard as *Lobotomy*.


Yes, I'm wrong to have even chimed in at all. I'm not debating or defending that. It just seems to me that people nowadays should know better than to use the "GIYF" statement (or related statements) considering the meaning it has nowadays, regardless of the intentions.
FreeMUD - A Python 3 MUD codebase: http://sourceforge.net/projects/freemud/


20. RE: Rebooting the Mud from another Port Fri Mar 14, 2008 [3:28 PM]
cratylus
Email not supplied
member since: Feb 1, 2006
In Reply To
Reply
"It just seems to me that people nowadays should know better than to use the "GIYF" statement (or related statements) considering the meaning it has nowadays, regardless of the intentions."

Specious nonsense. The advice stands on its own
as worthwhile. If someone on the internet actually
has a problem with GIYF, they have no business
being on the internet in the first place.

Further, the OP didn't get "GTFO, GIYF or FOAD".
The OP got a very gentle explanation of how
mann_jess uses it and a suggestion to do likewise.

Further, this was *after* posting a detailed set
of suggestions of apparent substance and helpfulness
for the specific technical question.

You talk a good game of keeping things civil
around here Lobotomy, but this is another example
of your severely misguided targeting and
dreadful execution.

Leave the goon-squadding to the experts, please.
You're just making a mess.

-Crat
http://lpmuds.net


21. RE: Rebooting the Mud from another Port Fri Mar 14, 2008 [5:02 PM]
Lobotomy
Email not supplied
member since: May 25, 2007
In Reply To
Reply
Very well.
FreeMUD - A Python 3 MUD codebase: http://sourceforge.net/projects/freemud/


22. RE: Rebooting the Mud from another Port Fri Mar 14, 2008 [6:33 PM]
mann_jess
Email not supplied
member since: Dec 10, 2005
In Reply To
Reply
AFAIK mann_jess is one of the most consistently non-evil people here

Aww. I'm flattered.

While I may have a lack of good qualities, I can at least look back and know that I am one of the few with the least number of bad ones. "Non-evil". It's so refreshing.

I would say that someone has a crush, but I think you probably remember my gender this time around. The third time's the charm, after all. ;)

Best of Luck,
-Jess




[Previous] [Next] [Post] [Reply] [Topics] [Summary] [Search]