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.

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

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.

AP_IOBUFSIZE 8192

Look at the Bugzilla from Apache Webserver

https://bz.apache.org/bugzilla/show_bug.cgi?id=64919