Parcourir la source

php configuration for gnusocial/postactiv

Bob Mottram il y a 7 ans
Parent
révision
dfa5992a94
2 fichiers modifiés avec 20 ajouts et 0 suppressions
  1. 11
    0
      src/freedombone-app-gnusocial
  2. 9
    0
      src/freedombone-app-postactiv

+ 11
- 0
src/freedombone-app-gnusocial Voir le fichier

@@ -611,6 +611,8 @@ function remove_gnusocial {
611 611
     if grep -q 'gnusocial-firewall' /etc/crontab; then
612 612
         sed -i '/gnusocial-firewall/d' /etc/crontab
613 613
     fi
614
+    sed -i 's|mysqli.allow_persistent.*|mysqli.allow_persistent = On|g' /etc/php/7.0/cli/php.ini
615
+    sed -i 's|mysqli.reconnect.*|mysqli.reconnect = Off|g' /etc/php/7.0/cli/php.ini
614 616
 
615 617
     function_check remove_ddns_domain
616 618
     remove_ddns_domain "$GNUSOCIAL_DOMAIN_NAME"
@@ -888,6 +890,15 @@ function install_gnusocial_main {
888 890
     # This improves performance
889 891
     sed -i "s|//\$config\\['db'\\]\\['schemacheck'\\].*|\$config\\['db'\\]\\['schemacheck'\\] = 'script';|g" "$gnusocial_config_file"
890 892
 
893
+    # remove the install script
894
+    if [ -f "/var/www/$GNUSOCIAL_DOMAIN_NAME/htdocs/install.php" ]; then
895
+        rm "/var/www/$GNUSOCIAL_DOMAIN_NAME/htdocs/install.php"
896
+    fi
897
+
898
+    # php configuration
899
+    sed -i 's|mysqli.allow_persistent.*|mysqli.allow_persistent = On|g' /etc/php/7.0/cli/php.ini
900
+    sed -i 's|mysqli.reconnect.*|mysqli.reconnect = On|g' /etc/php/7.0/cli/php.ini
901
+
891 902
     systemctl restart mariadb
892 903
     systemctl restart php7.0-fpm
893 904
     systemctl restart nginx

+ 9
- 0
src/freedombone-app-postactiv Voir le fichier

@@ -624,6 +624,8 @@ function remove_postactiv {
624 624
     remove_backup_database_local postactiv
625 625
 
626 626
     sed -i '/postactiv-firewall/d' /etc/crontab
627
+    sed -i 's|mysqli.allow_persistent.*|mysqli.allow_persistent = On|g' /etc/php/7.0/cli/php.ini
628
+    sed -i 's|mysqli.reconnect.*|mysqli.reconnect = Off|g' /etc/php/7.0/cli/php.ini
627 629
 
628 630
     function_check remove_ddns_domain
629 631
     remove_ddns_domain "$POSTACTIV_DOMAIN_NAME"
@@ -653,6 +655,9 @@ function install_postactiv_main {
653 655
 
654 656
     apt-get -yq install php-gettext php-curl php-gd php-mysql git curl
655 657
     apt-get -yq install memcached php-memcached php-intl exiftool libfcgi0ldbl
658
+    apt-get -yq install php7.0-bcmath php7.0-curl php7.0-exif php7.0-gd
659
+    apt-get -yq install php7.0-intl php7.0-mbstring php7.0-mysqlnd
660
+    apt-get -yq install php7.0-opcache php7.0-readline php7.0-xmlwriter
656 661
 
657 662
     if [ ! -d "/var/www/$POSTACTIV_DOMAIN_NAME" ]; then
658 663
         mkdir "/var/www/$POSTACTIV_DOMAIN_NAME"
@@ -905,6 +910,10 @@ function install_postactiv_main {
905 910
         rm "/var/www/$POSTACTIV_DOMAIN_NAME/htdocs/install.php"
906 911
     fi
907 912
 
913
+    # php configuration
914
+    sed -i 's|mysqli.allow_persistent.*|mysqli.allow_persistent = On|g' /etc/php/7.0/cli/php.ini
915
+    sed -i 's|mysqli.reconnect.*|mysqli.reconnect = On|g' /etc/php/7.0/cli/php.ini
916
+
908 917
     systemctl restart mariadb
909 918
     systemctl restart php7.0-fpm
910 919
     systemctl restart nginx