ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hi everybody! Merry Christmas or Happy Holidays! I just wanted everyone to know, that I now have posted my set of scripts, just the LINUX side for now. This has been many years of long, hard work as well, and part of the reason I sent it, is so I have a great backup. It's on github.
They are designed for Linux Mint, but they probably work on other Linux systems too. Hopefully, this should explain and show you a bit about how the network stuff fits together, which you, as a community, have helped me work on. Now others can benefit from hard work, which has been put into these! Please review, and tell me what you think! Please tell me what you think of it. I'll keep it open for a bit, while you tell me what you think of it. Thanks!
No. Not just network checks. That's why I posted the generic link. But I was refferring to ANY of my script repos. I'll take that, improvement if it's OK. But the reason, I didn't know to use a function, was I don't really know that part of the language well enough yet. Improvements and "show and tell", is why I put them up there. Is it OK to use the improvements?
Last edited by des_a; 12-23-2023 at 06:49 PM.
Reason: Forgot question.
They are all origionally designed for my home network. Of course, when I posted them, I hoped that for other people, they would find all kinds of uses as well. More improvements to come after focusing on servers for awhile! There's a bunch of things, like an update system for the network, that I want to implement, as I've done at my Mom's businesses. I can't use exact code, because they are designed for windows. I have to translate it to bash or sh language, as I go, and make other adjustments to it.
Now, I included copies of a basic, "settings" directory. The settings directory is like a custom /etc, which resides IN /etc. You can, like in all other cases, create a configuration specific to your enviroment. Have fun with my network scripts!
This would exit the shell(-script).
Better just return from the function:
The original exits from the script when any of the pings fails, so I was trying to replicate that behaviour. I suppose it could also be done with return and then set -e at the top level.
I do like the exit behavior. But that is pretty much why I put it on github. You can always help me with it by trying to come up with a complete patch to suggest, here or back on github. I would evaulate it, and see if I liked it enough to add it. I'm not checking here that often right now, as it's marked solved now, it had been awhile with no replies. And then if you don't like the path I'm taking, but find it useful, you could always fork it. I'm not so unhappy with the code, that I would want to use your fork though, unless it practically writes the moon. From the network script projects, I just wanted to make sure I could share, so I could a) become a better programmer and get more used to github, and b) Be able to have backups in case I lose my work locally, and c) Use the idea from others, that I can store my configuration on github, so others can benefit from it too. With these scripts, I can take Linux Mint, and by running them, have the system back up and running in a day or so, including the install. So things are pretty powerful!
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.