Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/nextcloudpi.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornachoparker <nacho@ownyourbits.com>2017-06-14 00:41:41 +0300
committernachoparker <nacho@ownyourbits.com>2017-06-28 08:15:43 +0300
commitc03bb6fd8a35be370569d33d76afc7d9838376e5 (patch)
tree899d49913e2b4403a559bdec788e39db77bce2d9
parentecedf913065834e0d00fa3dc2ab73d1a66d4d572 (diff)
support for utf8 4byte charv0.12.19
-rw-r--r--etc/nc-init.sh14
-rwxr-xr-xinstaller.sh4
-rw-r--r--lamp.sh10
3 files changed, 23 insertions, 5 deletions
diff --git a/etc/nc-init.sh b/etc/nc-init.sh
index 28a71336..df44b188 100644
--- a/etc/nc-init.sh
+++ b/etc/nc-init.sh
@@ -21,7 +21,7 @@ DBPASSWD_=ownyourbits
install()
{
- # RE-CREATE DATABASE TABLE (workaround to emulate DROP USER IF EXISTS ..;)
+ ## RE-CREATE DATABASE TABLE (workaround to emulate DROP USER IF EXISTS ..;)
echo "Setting up database..."
@@ -33,7 +33,9 @@ install()
mysql -u root -p$DBPASSWD_ <<EOF
DROP DATABASE IF EXISTS nextcloud;
-CREATE DATABASE nextcloud;
+CREATE DATABASE nextcloud
+ CHARACTER SET utf8mb4
+ COLLATE utf8mb4_unicode_ci;
GRANT USAGE ON *.* TO '$DBADMIN_'@'localhost' IDENTIFIED BY '$DBPASSWD_';
DROP USER '$DBADMIN_'@'localhost';
CREATE USER '$DBADMIN_'@'localhost' IDENTIFIED BY '$DBPASSWD_';
@@ -41,7 +43,7 @@ GRANT ALL PRIVILEGES ON nextcloud.* TO $DBADMIN_@localhost;
EXIT
EOF
- # INITIALIZE NEXTCLOUD
+ ## INITIALIZE NEXTCLOUD
echo "Setting up Nextcloud..."
@@ -50,8 +52,14 @@ EOF
"mysql" --database-name "nextcloud" --database-user "$DBADMIN_" --database-pass \
"$DBPASSWD_" --admin-user "$ADMINUSER_" --admin-pass "$DBPASSWD_"
+ # cron jobs
sudo -u www-data php occ background:cron
+
+ # ACPu cache
sed -i '$i\ \ '\''memcache.local'\'' => '\''\\\\OC\\\\Memcache\\\\APCu'\'',' /var/www/nextcloud/config/config.php
+
+ # 4 Byte UTF8 support
+ sudo -u www-data php occ config:system:set mysql.utf8mb4 --type boolean --value="true"
}
configure(){ :; }
diff --git a/installer.sh b/installer.sh
index d6f2c06c..b170126b 100755
--- a/installer.sh
+++ b/installer.sh
@@ -38,10 +38,12 @@ IMGFILE=$3 # Third argument is the image file to start from ( empty
source etc/library.sh # initializes $IMGNAME
+test -f $IMGNAME && { echo "INFO: $IMGNAME already exists. Skip generation ... "; exit 0; }
+
config $INSTALL_SCRIPT || exit 1 # Initializes $INSTALLATION_CODE
if [[ "$IMGFILE" != "" ]]; then
- launch_install_qemu "$IMGFILE" $IP || { sudo killall qemu-system-arm; exit 1; } # initializes $IMGOUT
+ launch_install_qemu "$IMGFILE" $IP || { sudo killall qemu-system-arm; exit 1; } # initializes $IMGOUT
pack_image "$IMGOUT" "$IMGNAME"
else
launch_installation_online $IP
diff --git a/lamp.sh b/lamp.sh
index 96fce275..e2aeec2f 100644
--- a/lamp.sh
+++ b/lamp.sh
@@ -54,7 +54,7 @@ EOF
mkdir -p /run/mysqld
chown mysql /run/mysqld
- # CONFIGURE APACHE AND PHP7
+ # CONFIGURE APACHE
##########################################
cat >/etc/apache2/conf-available/http2.conf <<EOF
@@ -78,6 +78,9 @@ EOF
</IfModule>
EOF
+ # CONFIGURE PHP7
+ ##########################################
+
cat > /etc/php/7.0/mods-available/apcu.ini <<EOF
extension=apcu.so
apc.enable_cli=0
@@ -120,6 +123,11 @@ EOF
$APTINSTALL ssl-cert # self signed snakeoil certs
+ # configure MariaDB ( UTF8 4 byte support )
+ sed -i '/\[mysqld\]/ainnodb_large_prefix=on' /etc/mysql/mariadb.conf.d/50-server.cnf
+ sed -i '/\[mysqld\]/ainnodb_file_per_table=1' /etc/mysql/mariadb.conf.d/50-server.cnf
+ sed -i '/\[mysqld\]/ainnodb_file_format=barracuda' /etc/mysql/mariadb.conf.d/50-server.cnf
+
cat > /etc/apache2/sites-available/nextcloud.conf <<'EOF'
<IfModule mod_ssl.c>
<VirtualHost _default_:443>