@@ -29,16 +29,31 @@ mysql_install_db --user=mysql --basedir=/usr --datadir=/var/lib/mysql >/dev/null
2929$STD rc-service mariadb start
3030msg_ok " MariaDB Configured"
3131
32- read -r -p " Would you like to install Adminer with lighthttpd ? <y/N>: " prompt
32+ read -r -p " Would you like to install Adminer with lighttpd ? <y/N>: " prompt
3333if [[ ${prompt,,} =~ ^(y| yes)$ ]]; then
34- msg_info " Installing Adminer"
35- $STD apk add --no-cache lighttpd php php-cgi php-mysqli php-mbstring php-zip php-gd php-json php-curl jq
36- sed -i ' s|server.modules += ( "mod_cgi" )|server.modules += ( "mod_cgi", "mod_fastcgi" )|' /etc/lighttpd/lighttpd.conf
37- echo ' fastcgi.server += ( ".php" => (( "bin-path" => "/usr/bin/php-cgi", "socket" => "/var/run/php-cgi.sock" )))' >> /etc/lighttpd/lighttpd.conf
38- ADMINER_VERSION=$( curl -fsSL https://api.github.com/repos/vrana/adminer/releases/latest | jq -r ' .tag_name' | sed ' s/v//' )
39- curl -fsSL " https://github.com/vrana/adminer/releases/download/v${ADMINER_VERSION} /adminer-${ADMINER_VERSION} .php" -o /var/www/adminer.php
40- chown lighttpd:lighttpd /var/www/adminer.php
41- chmod 755 /var/www/adminer.php
34+ msg_info " Installing Adminer and dependencies"
35+ $STD apk add --no-cache \
36+ lighttpd \
37+ lighttpd-openrc \
38+ php83 \
39+ php83-cgi \
40+ php83-common \
41+ php83-curl \
42+ php83-gd \
43+ php83-mbstring \
44+ php83-mysqli \
45+ php83-mysqlnd \
46+ php83-openssl \
47+ php83-zip \
48+ php83-session \
49+ jq
50+
51+ sed -i ' s|# *include "mod_fastcgi.conf"|include "mod_fastcgi.conf"|' /etc/lighttpd/lighttpd.conf
52+ mkdir -p /var/www/localhost/htdocs
53+ ADMINER_VERSION=$( curl -fsSL https://api.github.com/repos/vrana/adminer/releases/latest | jq -r ' .tag_name' | sed ' s/^v//' )
54+ curl -fsSL " https://github.com/vrana/adminer/releases/download/v${ADMINER_VERSION} /adminer-${ADMINER_VERSION} .php" -o /var/www/localhost/htdocs/adminer.php
55+ chown lighttpd:lighttpd /var/www/localhost/htdocs/adminer.php
56+ chmod 755 /var/www/localhost/htdocs/adminer.php
4257 msg_ok " Adminer Installed"
4358
4459 msg_info " Starting Lighttpd"
0 commit comments