Simple shell script to validate nginx or apache2 version on a Linux server
- or -
Post a project like this2400
$$$
- Posted:
- Proposals: 6
- Remote
- #1705252
- Awarded
Description
Experience Level: Expert
General information for the business: Software Developer
Description of requirements/functionality: We have an installation script for our server software that runs on either apache2 or nginx. So we have two different installer scripts. One for apache2 and one for nginx.
We need a Linux bash shell script which verifies that the nginx or apache2 version on a users server matches what our binary is compiled with before our installer script continues to install our software.
For example: The current Centos 64 version 7.3 server should be using nginx version 1.10.2 so our binary is compiled against nginx version 1.10.2
If the nginx or apache2 version does not match the required version number we provide for you, then the script should abort the rest of our shell script software installer and echo "Failed Installation due to wrong apache2 or nginx version on your server. Please contact Tech Support for assistance".
If the nginx or apache2 version does match the required version number we provide for you, then the script should continue running our software installation.
We will test the shell script for you on our debian and RPM servers to be sure it works.
Our installer script is attached as a tar.gz file so you can see where your code must go which is at the beginning of the installer script.
Thank you
John
OS requirements: Linux
Extra notes:
Description of requirements/functionality: We have an installation script for our server software that runs on either apache2 or nginx. So we have two different installer scripts. One for apache2 and one for nginx.
We need a Linux bash shell script which verifies that the nginx or apache2 version on a users server matches what our binary is compiled with before our installer script continues to install our software.
For example: The current Centos 64 version 7.3 server should be using nginx version 1.10.2 so our binary is compiled against nginx version 1.10.2
If the nginx or apache2 version does not match the required version number we provide for you, then the script should abort the rest of our shell script software installer and echo "Failed Installation due to wrong apache2 or nginx version on your server. Please contact Tech Support for assistance".
If the nginx or apache2 version does match the required version number we provide for you, then the script should continue running our software installation.
We will test the shell script for you on our debian and RPM servers to be sure it works.
Our installer script is attached as a tar.gz file so you can see where your code must go which is at the beginning of the installer script.
Thank you
John
OS requirements: Linux
Extra notes:
John M.
100% (25)Projects Completed
18
Freelancers worked with
15
Projects awarded
86%
Last project
16 Jan 2021
United States
New Proposal
Login to your account and send a proposal now to get this project.
Log inClarification Board Ask a Question
-
With the time it would take me to give you a quote I may as well give you the answer.
NGVER=$(nginx -v 2>&1 | sed "s/nginx version: nginx\///")
if [ $NGVER = 1.10.2 ]
then
echo 'version found'
else
echo 'not found'
fi
498200
We collect cookies to enable the proper functioning and security of our website, and to enhance your experience. By clicking on 'Accept All Cookies', you consent to the use of these cookies. You can change your 'Cookies Settings' at any time. For more information, please read ourCookie Policy
Cookie Settings
Accept All Cookies