13 ms·
> curl https://.. https://... | /bin/bash Really? At least it's https, but how about building a proper package nightly, or commit-ly? You already assume ubuntu
by viraptor 15y ago
> curl https://.. https://... | /bin/bash
Really? At least it's https, but how about building a proper package nightly, or commit-ly? You already assume ubuntu and apache, so this could be just a static, easily uninstallable deb. The script makes loads of dangerous assumptions.
"apt-get upgrade --assume-yes --quiet" - please don't assume stuff about other people's systems.
"apt-get install loads_of_stuff" - this effectively makes it impossible to remove all unneeded deps later on.
"ifconfig eth0 | grep 'inet addr:' | cut -d: -f2 | awk '{ print $1}'" - that's bound to fail in many cases - either return just 0.0.0.0, or try to find the actual default interface:
DEV=$(ip r l match 0 | grep -Po '(?<=dev )\S+')
IP=$(ip a s dev $DEV | grep -Po '(?<=inet )[^/]+')
Otherwise - I like the idea :)
- jmathai 15y agohttps://github.com/openphoto/frontend/tags https://github.com/openphoto/frontend/tags The warning above that shell script is there for a reason. I hope nobody actually does that (except me since I know it's sane and need to spin up instances regularly).
- moe 15y agoYou should just remove the script or make clear that it will potentially annihilate the victims host up to the point of rendering it unbootable. "apt-get upgrade" is not a safe operation. It will install new kernels and boot-loaders and it may get terribly confused in the face of pinned packages or mixed repositories. "--assume-yes" is a really bad idea and running "apt-get upgrade" is none of your installers business in first place.
- jcwilliams 15y agoThat warning isn't nearly strong enough. Someone skimming might just see that as an innocuous install script (I certainly would have). There needs to be a huge bold warning: "CHANCES ARE THIS SCRIPT WILL DESTROY YOUR SYSTEM." Maybe not using that wording, but seriously, running this would certainly screw up a lot of stuff on my system, and I'm not alone.
- hub_ 15y agoPlease file a bug for the script bugs. And if a DD wants to step in a package, it would be lovely. (I run my devel instance from git on Debian oldstable)
- count 15y agoifconfig is deprecated for IP addresses - that should be 'ip addr show'...
- viraptor 15y agoifconfig was from the original script. ip version is what I'm proposing.
- jmathai 15y agoI didn't personally write this script but you should totally submit a pull request :) https://github.com/openphoto/frontend/blob/master/documentation/guides/InstallationUbuntuApache.sh https://github.com/openphoto/frontend/blob/master/documentat...