pksteyn / php-fpmpal

PHP-FPM script that makes recommendations on max_children
GNU General Public License v3.0
55 stars 23 forks source link

Issue: bc not installed spam #16

Closed LukeShirnia closed 6 years ago

LukeShirnia commented 6 years ago
"bc" is not installed. This script depends on it.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
Please answer yes or no.
richardforth commented 6 years ago

lmao :D

On Thu, 6 Sep 2018 at 10:19, Luke Shirnia notifications@github.com wrote:

Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no. Please answer yes or no.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/pksteyn/php-fpmpal/issues/16, or mute the thread https://github.com/notifications/unsubscribe-auth/AFpUV2w2XKRfOED5NRQyCkd4bDFhB5Kzks5uYOiugaJpZM4Wci0r .

-- This message is considered confidential and is intended only for the recipient. If you receive this message in error please delete it immediately and disregard it's contents. Please also send an email to richard.forth@gmail.com to report the error.

LukeShirnia commented 6 years ago

The issue appears to be with the way we are opening the file (through a python script): This is when we get the issue:

$ cat open.py 
#!/user/bin/env python
import signal
import subprocess

def default_sigpipe():
    signal.signal(signal.SIGPIPE, signal.SIG_DFL)

with open('php-fpmpal.sh', 'r') as content_file:
    content = content_file.read()

cmd = 'bash -s'
p = subprocess.Popen(cmd, shell=True, stdin=subprocess.PIPE, preexec_fn=default_sigpipe)
p.communicate(content)

I can confirm executing php-fpmpal.sh normally works fine:

$ bash php-fpm.sh
"bc" is not installed. This script depends on it.
Do you wish to install bc? (y/n)
n

I have made a few changes to the php-fpmpal.sh and got the script working as expected. I changed the read ... yn method to read yn < /dev/tty: Old

while true; do
   read -p "Do you wish to install bc? (y/n)" yn

New

while true; do
   echo "Do you wish to install bc? (y/n)"
   read yn < /dev/tty

Changes look good so far:

$ python open.py 
"bc" is not installed. This script depends on it.
Do you wish to install bc? (y/n)

I will keep testing and put a PR in later if all is good.

LukeShirnia commented 6 years ago

Resolved in accepted PR #17