The script never should get to the point of trying to restart a reinstalled service if it wasn't installed with sudo, but it's a good idea to have this check regardless.
Changed AUTOSTART to [-s], which makes more sense.
Added RedHat/CentOS warning to suggest using -s
Cleaned AUTOSTART segment and added a warning when this option is being used but may not be needed.
What's more, in newer versions of fedora (and eventually in redhat/centos) yum is superceded by dnf, which doesn't have the localinstall option. It only supports install. Yum in these versions passes all commands on to dnf, so using yum localinstall in these versions throws an error. Because older versions of yum allow install to do localinstalls, this seems like the best middle ground.
the version is already installed so callers can detect what happen.
Lastly, the version stuff is gone, no point when I'm merging pull
requests :) Please use git instead :D
Script now autodetects redhat based distributions and download
the correct file. Can also install using the autoinstall option.
NOTE! Not as well tested as Debian based systems, since I don't
run any redhat distro myself. Please provide feedback if
you have issues.
Added convenience function to automatically install the newly
downloaded file. Requires root, so there is now a root check
before continuing.
Signed-off-by: Henric Andersson <ha@sensenet.nu>
It's now possible to use this tool to download the
public version by supplying the -p option.
Also renamed the tool to something more fitting.
Signed-off-by: Henric Andersson <ha@sensenet.nu>