Ubuntu uses different package names from CentOS mind you.
The trick is to detect the distribution first and then have different sets of commands doing the same thing.
This is actually the way to write multiplatform Ansible roles as well
Yeah, which are the edge cases I’m talking about (I was typing the edit as you posted haha). The majority of common packages are generally the same, it wouldn’t be difficult to test it and find any variations.
Though, I would argue that the level that Ansible utilises is probably overkill for this project.
Well, glad I will be learning something along the way. I will have a prototype up in about 15-30 minutes for anyone that is interested to have an early look/test run.
I will have a look at distro/packages recognition in the next couple days. Happy to learn smth along the way
Thanks for all the input guys!
Nice! I’ve already made another commit, I’ll do some more when I get back from the gym I need to add a load of distro checks since there aren’t any yet (other than at the beginning of the script).
Aight! Thanks for the contributions
Why printf instead of echo? Noticed you changed that. Google didn’t really say anything except that echo is newline and printf not. But I didn’t consider this a problem.
Alright. I might need to customize this to be the ultimate VPS idler script… toss in some 1 button disk + network benchmarks so I can lock down and bench a new box, haha.
Geekbench and Bench.sh are included already. Any specific one you are looking for?
Feel free to create a pull request on GitHub or request it and I’ll add it when I have time^^
Wasn’t there some nice LET network bench with lots of speedtest locations?
If you’ve got bench.sh already then that’s basically what I was referring to. So I’ve got no work to do, lol.
If I have some time maybe I’ll build an iperf function to install + have a pre-set list of the popular servers to test against or something if you haven’t already built it.