mirror of
https://github.com/mtan93/install-nextcloud.git
synced 2026-03-08 05:31:52 +00:00
function phpimagickexception()
Solution for ImagickException in /var/nc_data/nextcloud.log as described here: https://www.c-rieger.de/spawn-your-nextcloud-server-using-one-shell-script/
This commit is contained in:
@@ -3,9 +3,9 @@
|
|||||||
# https://www.c-rieger.de
|
# https://www.c-rieger.de
|
||||||
# https://github.com/riegercloud
|
# https://github.com/riegercloud
|
||||||
# INSTALL-NEXTCLOUD-ARM64.SH
|
# INSTALL-NEXTCLOUD-ARM64.SH
|
||||||
# Version 6.4 (ARM64)
|
# Version 6.5 (ARM64)
|
||||||
# OpenSSL 1.1.1, TLSv1.3
|
# OpenSSL 1.1.1, TLSv1.3
|
||||||
# October, 25th 2018
|
# October, 26th 2018
|
||||||
################################################
|
################################################
|
||||||
# Ubuntu 18.04 LTS AMD64 - Nextcloud 14
|
# Ubuntu 18.04 LTS AMD64 - Nextcloud 14
|
||||||
################################################
|
################################################
|
||||||
@@ -24,6 +24,18 @@ function restart_all_services() {
|
|||||||
/usr/sbin/service redis-server restart
|
/usr/sbin/service redis-server restart
|
||||||
/usr/sbin/service php7.2-fpm restart
|
/usr/sbin/service php7.2-fpm restart
|
||||||
}
|
}
|
||||||
|
###global function to solve php-imagickexception as decribed here: https://www.c-rieger.de/solution-for-imagickexception-in-nextcloud-log
|
||||||
|
function phpimagickexception() {
|
||||||
|
/usr/sbin/service nginx stop
|
||||||
|
/usr/sbin/service php7.2-fpm stop
|
||||||
|
cp /etc/ImageMagick-6/policy.xml /etc/ImageMagick-6/policy.xml.bak
|
||||||
|
sed -i "s/rights\=\"none\" pattern\=\"PS\"/rights\=\"read\|write\" pattern\=\"PS\"/" /etc/ImageMagick-6/policy.xml
|
||||||
|
sed -i "s/rights\=\"none\" pattern\=\"EPI\"/rights\=\"read\|write\" pattern\=\"EPI\"/" /etc/ImageMagick-6/policy.xml
|
||||||
|
sed -i "s/rights\=\"none\" pattern\=\"PDF\"/rights\=\"read\|write\" pattern\=\"PDF\"/" /etc/ImageMagick-6/policy.xml
|
||||||
|
sed -i "s/rights\=\"none\" pattern\=\"XPS\"/rights\=\"read\|write\" pattern\=\"XPS\"/" /etc/ImageMagick-6/policy.xml
|
||||||
|
/usr/sbin/service nginx restart
|
||||||
|
/usr/sbin/service php7.2-fpm restart
|
||||||
|
}
|
||||||
###global function to scan Nextcloud data and generate an overview for fail2ban & ufw
|
###global function to scan Nextcloud data and generate an overview for fail2ban & ufw
|
||||||
function nextcloud_scan_data() {
|
function nextcloud_scan_data() {
|
||||||
sudo -u www-data php /var/www/nextcloud/occ files:scan --all
|
sudo -u www-data php /var/www/nextcloud/occ files:scan --all
|
||||||
@@ -659,7 +671,7 @@ echo "---------------------------------"
|
|||||||
echo ""
|
echo ""
|
||||||
sudo -u www-data php /var/www/nextcloud/occ db:add-missing-indices
|
sudo -u www-data php /var/www/nextcloud/occ db:add-missing-indices
|
||||||
sudo -u www-data php /var/www/nextcloud/occ db:convert-filecache-bigint
|
sudo -u www-data php /var/www/nextcloud/occ db:convert-filecache-bigint
|
||||||
/usr/sbin/service nginx start
|
phpimagickexception
|
||||||
nextcloud_scan_data
|
nextcloud_scan_data
|
||||||
restart_all_services
|
restart_all_services
|
||||||
### run the cron.php once
|
### run the cron.php once
|
||||||
|
|||||||
Reference in New Issue
Block a user