bash script detect os and execute command

If you have multi servers Linux Distribution and should check only Ubuntu. Then you can use this script to select the os and if only match the OS then execute the command.

if [ -e "/etc/issue" ] ;
issue=`cat /etc/issue`
set -- $issue
if [ $1 = "Ubuntu" ] ;
    nginx -v 2>&1 | grep -o 1.* | cut -c1-6 

apache AH01070: Error parsing script headers

If you are using Magento 2 and you got this 500 error from admin login page. Your Content Security Policy header are too long. Use Nginx or reduce your headers.

Problem is AP_IOBUFSIZE cannot be changed by a conf file it is hardcoded in to the sourcecode. You have only 8192 Bytes and this os offen to low. If you reach this limit your apache will crash and restart.


Look at the Bugzilla from Apache Webserver