@@ -330,6 +330,7 @@ function identifyOS {
330
330
elif [[ " $NAME " == " Debian GNU/Linux" && " $VERSION " == " 8 (jessie)" ]]; then
331
331
abort " Error: This version of Debian GNU/Linux is not supported anymore. Please upgrade to Debian 12."
332
332
elif [[ " $NAME " == " Red Hat Enterprise Linux" && " $VERSION_ID " == 8* ]]; then
333
+
333
334
OS=" rhel8"
334
335
APACHE_USER=" apache"
335
336
APACHE_GROUP=" apache"
@@ -359,6 +360,7 @@ function identifyOS {
359
360
MEMCACHED_UNIT=" memcached"
360
361
PHP_FPM_UNIT=" php-fpm"
361
362
elif [[ " $NAME " == " SLES" && " $VERSION " == 15* ]]; then
363
+
362
364
OS=" sles15"
363
365
INSTALL_DIR=" /srv/www/htdocs"
364
366
APACHE_USER=" wwwrun"
@@ -375,6 +377,7 @@ function identifyOS {
375
377
elif [[ " $NAME " = " SLES" && " $VERSION_ID " == 12* ]]; then
376
378
abort " Error: SLES 12 is out-dated. It's not supported anymore. Please upgrade."
377
379
elif [[ " $NAME " == " openSUSE Leap" && " $VERSION " == 15* ]]; then
380
+
378
381
OS=" opensuse15"
379
382
INSTALL_DIR=" /srv/www/htdocs"
380
383
APACHE_USER=" wwwrun"
@@ -408,6 +411,7 @@ function identifyOS {
408
411
abort " Error: Ubuntu 24.04 is using PHP 8.3 which is actually not supported by i-doit. See https://kb.i-doit.com/en/installation/system-requirements.html. \nPlease use Ubuntu 22.04 or install i-doit manually with PHP 8.2."
409
412
elif [[ " $NAME " == " Ubuntu" && " $VERSION_ID " == " 22.04" ]]; then
410
413
export DEBIAN_FRONTEND=" noninteractive"
414
+
411
415
OS=" ubuntu2204"
412
416
APACHE_USER=" www-data"
413
417
APACHE_GROUP=" www-data"
@@ -422,6 +426,7 @@ function identifyOS {
422
426
PHP_FPM_UNIT=" php8.1-fpm"
423
427
elif [[ " $NAME " == " Ubuntu" && " $VERSION_ID " == " 20.04" ]]; then
424
428
export DEBIAN_FRONTEND=" noninteractive"
429
+
425
430
OS=" ubuntu2004"
426
431
APACHE_USER=" www-data"
427
432
APACHE_GROUP=" www-data"
@@ -1428,7 +1433,7 @@ EOF
1428
1433
" $a2_en_mod " rewrite || abort " Unable to enable Apache module rewrite"
1429
1434
log " Let every user read the logs"
1430
1435
chmod 755 /var/log/apache2 || abort " Unable to change permissions"
1431
- chmod 664 /var/log/apache2/* || abort " Unable to change permissions"
1436
+ chmod 664 /var/log/apache2/ || abort " Unable to change permissions"
1432
1437
unitctl " restart" " $APACHE_UNIT "
1433
1438
;;
1434
1439
esac
@@ -1447,7 +1452,7 @@ function configureMariaDB {
1447
1452
1448
1453
# Check mariadb version
1449
1454
local mariadb_version=" "
1450
- mariadb_version=$( mysql --version | head -n1 -c29 | tail -c 5 )
1455
+ mariadb_version=$( mysql --version | head -n1 | sed -e ' s/.* Distrib \([0-9]*\.[0-9]*\)\.[0-9]*.*/\1/ ' )
1451
1456
1452
1457
log " Prepare shutdown of MariaDB"
1453
1458
" $MARIADB_BIN " \
@@ -1546,15 +1551,17 @@ EOF
1546
1551
if [[ -d " /var/log/mysql" ]]; then
1547
1552
log " Let every user read the logs"
1548
1553
chmod 755 /var/log/mysql
1549
- chmod 664 /var/log/mysql/*
1554
+ chmod 664 /var/log/mysql/
1550
1555
fi
1551
1556
1552
- unitctl " start" " $MARIADB_UNIT "
1557
+ unitctl " start" " $MARIADB_UNIT "
1558
+
1553
1559
}
1554
1560
1555
1561
function secureMariaDB {
1562
+
1556
1563
local mariadb_version=" "
1557
- mariadb_version=$( mysql --version | head -n1 -c29 | tail -c 5 )
1564
+ mariadb_version=$( mysql --version | head -n1 | sed -e ' s/.* Distrib \([0-9]*\.[0-9]*\)\.[0-9]*.*/\1/ ' )
1558
1565
1559
1566
echo -n -e \
1560
1567
" Please enter a new password for MariaDB's super user '${MARIADB_SUPERUSER_USERNAME} ' [leave empty for '${MARIADB_SUPERUSER_PASSWORD} ']: "
@@ -1803,7 +1810,7 @@ function installIDoit {
1803
1810
MARIADB_IDOIT_PASSWORD=" $mariaDBidoitPassword "
1804
1811
fi
1805
1812
1806
- sudo -u ${APACHE_USER} ${prefix} ${console} install \
1813
+ sudo -u " ${APACHE_USER} " " ${prefix} " " ${console} " install \
1807
1814
-u " $MARIADB_SUPERUSER_USERNAME " \
1808
1815
-p " $MARIADB_SUPERUSER_PASSWORD " \
1809
1816
--host=" $MARIADB_HOSTNAME " \
@@ -1834,7 +1841,7 @@ function create_tenant {
1834
1841
tenant_name=" $tenantName "
1835
1842
fi
1836
1843
1837
- sudo -u ${APACHE_USER} ${prefix} ${console} tenant-create \
1844
+ sudo -u " ${APACHE_USER} " " ${prefix} " " ${console} " tenant-create \
1838
1845
-u " $MARIADB_SUPERUSER_USERNAME " \
1839
1846
-p " $MARIADB_SUPERUSER_PASSWORD " \
1840
1847
-U " $MARIADB_IDOIT_USERNAME " \
0 commit comments