Start the FreeBSD install script (not ready)

This commit is contained in:
Mark J Crane
2017-03-25 11:41:47 -06:00
parent 59c4f4473e
commit 83f064cae0
30 changed files with 1227 additions and 0 deletions

36
freebsd/resources/php.sh Executable file
View File

@@ -0,0 +1,36 @@
#!/bin/sh
#move to script directory so all relative paths work
cd "$(dirname "$0")"
#includes
. ./config.sh
. ./colors.sh
#send a message
verbose "Configuring PHP"
#update config if source is being used
if [ ."$php_version" = ."5" ]; then
verbose "version 5.x"
php_ini_file='/etc/php5/fpm/php.ini'
fi
if [ ."$php_version" = ."7" ]; then
verbose "version 7.0"
php_ini_file='/etc/php/7.0/fpm/php.ini'
fi
sed 's#post_max_size = .*#post_max_size = 80M#g' -i $php_ini_file
sed 's#upload_max_filesize = .*#upload_max_filesize = 80M#g' -i $php_ini_file
#restart php-fpm
#systemd
if [ ."$php_version" = ."5" ]; then
systemctl restart php5-fpm
fi
if [ ."$php_version" = ."7" ]; then
systemctl restart php7.0-fpm
fi
#init.d
#/usr/sbin/service php5-fpm restart
#/usr/sbin/service php7.0-fpm restart