forked from norman/fusionpbx-install.sh-github-mirror
* added CentOS, Fedora, RHEL choices with minimal version check (recommited) * fixed small typos * added special option --use-php5-package * parse options and export new environment variable USE_PHP5_PACKAGE * added choice between php5* or php7.0* packages (recommited) * fixed php*-fpm service name and php.ini file path (recommited) * prepare socket name for nginx to work with php5-fpm or php7.0-fpm (recommited) * added ppa:ondrej/php5-compat repo * added dependency ppa:ondrej/php repo and package software-properties-common * added execute permissions to ./centos/*.sh files
23 lines
555 B
Bash
Executable File
23 lines
555 B
Bash
Executable File
# no default SSL in centos, generate a tmp certificate
|
|
# ssl_certificate /etc/ssl/certs/nginx.crt;
|
|
# ssl_certificate_key /etc/ssl/private/nginx.key;
|
|
|
|
DOMAIN=$(hostname)
|
|
SSL_DIR="/etc/ssl"
|
|
|
|
SUBJ="
|
|
C=US
|
|
ST=Idaho
|
|
O=FusionPBX
|
|
localityName=Boise
|
|
commonName=$DOMAIN
|
|
organizationUnitName=
|
|
emailAddress=
|
|
"
|
|
|
|
mkdir -p $SSL_DIR/private && mkdir -p $SSL_DIR/certs
|
|
chmod 700 $SSL_DIR/private
|
|
|
|
openssl req -x509 -nodes -subj "$(echo -n "$SUBJ" | tr "\n" "/")" -days 365 -newkey rsa:2048 -keyout "$SSL_DIR/private/nginx.key" -out "$SSL_DIR/certs/nginx.crt"
|
|
|