-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from leonidasv/master
Updated support for php-7.0 + dependency check
- Loading branch information
Showing
1 changed file
with
16 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,8 @@ | |
# | ||
# Copyright (c) 2014 Mathias Leppich <[email protected]> | ||
# | ||
# Copyright (c) 2017 Leonidas Villeneuve <[email protected]> | ||
# | ||
# Permission is hereby granted, free of charge, to any person obtaining a copy | ||
# of this software and associated documentation files (the "Software"), to deal | ||
# in the Software without restriction, including without limitation the rights | ||
|
@@ -22,13 +24,24 @@ | |
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
# THE SOFTWARE. | ||
|
||
#First time execution dependency install (Ubuntu only) | ||
|
||
if [ $(lsb_release -a 2>/dev/null | grep -c "Ubuntu") = 2 ] && [ ! -f $HOME/.php-fpm-cli ] && [ $(dpkg-query -W -f='${Status}' libfcgi0ldbl 2>/dev/null | grep -c "ok installed") = 0 ]; then | ||
echo "This application depends on libfcgi0ldbl, which is not installed on your system. This script will install it now."; | ||
sudo apt-get install libfcgi0ldbl; | ||
echo ' ' > $HOME/.php-fpm-cli; | ||
elif [ $(lsb_release -a 2>/dev/null | grep -c "Ubuntu") -eq 2 ] && [ $(dpkg-query -W -f='${Status}' libfcgi0ldbl 2>/dev/null | grep -c "ok installed") -eq 1 ]; then | ||
echo ' ' > $HOME/.php-fpm-cli; | ||
fi | ||
|
||
|
||
usage() { | ||
cat <<USAGE | ||
Usage: $(basename $0) [-connect CONN] -r <code> | ||
Options: | ||
-connect CONN Passed to cgi-fcgi, default: /var/run/php5-fpm.sock | ||
examples: ip.add.re.ss:port or /path/to/php-fpm.sock | ||
-connect CONN Passed to cgi-fcgi, default: /var/run/php/php7.0-fpm.sock | ||
examples: ip.add.re.ss:port or /path/to/php[version]-fpm.sock | ||
-r <code> Run PHP <code> without using script tags <?..?> | ||
|
@@ -48,7 +61,7 @@ stripheaders() { | |
} | ||
|
||
PHPFPMCLI_FILE="/tmp/php-fpm-cli.$$.php" | ||
CONN="/var/run/php5-fpm.sock" | ||
CONN="/var/run/php/php7.0-fpm.sock" | ||
PHPCODE="" | ||
init() { | ||
until [ -z "$1" ]; do | ||
|