Skip to content

Commit 3894cbf

Browse files
committed
Updated install script
1 parent cf62827 commit 3894cbf

2 files changed

Lines changed: 15 additions & 8 deletions

File tree

CHANGELOG.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ AD Auth broken in PHP 8
99

1010
Fixed MySQL Auth library
1111

12+
Updated install script
13+
1214
-------------------------------------
1315
7.1-1 2025-04-24
1416
-------------------------------------

packaging/install-scripts/install.bash

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ INSTALL_EXTPACK=${INSTALL_EXTPACK:=false}
2727
PHPVBOX_INSTALL_DIR=${PHPVBOX_INSTALL_DIR:='/usr/share/phpvirtualbox'}
2828
PHPVBOX_VERSION=${PHPVBOX_VERSION:='latest'}
2929
APT=${APT:='apt-get -y'}
30-
APT_KEY=${APT_KEY:='apt-key'}
3130
ACCEPT_ORACLE_EXTPACK_LICENSE=${ACCEPT_ORACLE_EXTPACK_LICENSE:='n'}
3231
VBOX_USER=${VBOX_USER:='vbox'}
3332
VBOX_GROUP=${VBOX_GROUP:='vboxusers'}
@@ -96,6 +95,12 @@ if [ "$EUID" -ne 0 ]; then
9695
exit
9796
fi
9897

98+
########################
99+
## INSTALL PREREQUISITES
100+
########################
101+
102+
${APT} install curl lsb-release
103+
99104
########################
100105
## INSTALL VIRTUALBOX ##
101106
########################
@@ -109,7 +114,7 @@ if [ "${INSTALL_VBOX}" = true ]; then
109114
fi
110115
if [ "${PHPVBOX_VERSION}" == "development" ]; then
111116

112-
VIRTUALBOX_VERSION=$(wget -O- https://raw.githubusercontent.com/phpvirtualbox/phpvirtualbox/develop/endpoints/lib/config.php | grep "define('PHPVBOX_VER'" | sed -n "s/^.*\([0-9]\+\.[0-9]\+\).*$/\1/p")
117+
VIRTUALBOX_VERSION=$(curl -s https://raw.githubusercontent.com/phpvirtualbox/phpvirtualbox/develop/endpoints/lib/config.php | grep "define('PHPVBOX_VER'" | sed -n "s/^.*\([0-9]\+\.[0-9]\+\).*$/\1/p")
113118
else
114119
VIRTUALBOX_VERSION=`echo "$PHPVBOX_VERSION" | sed -n "s/^\([0-9]\+\.[0-9]\+\).*$/\1/p"`
115120
fi
@@ -129,15 +134,15 @@ EOT
129134
set -o pipefail
130135

131136
echo ">>>> Importing Oracle Virtualbox Debian Repository key <<<<"
132-
wget -q https://www.virtualbox.org/download/oracle_vbox_2016.asc -O- | ${APT_KEY} add -
137+
curl -s https://www.virtualbox.org/download/oracle_vbox_2016.asc -o /etc/apt/trusted.gpg.d/oracle_vbox_2016.asc
133138

134139
echo ">>>> Adding Oracle Virtualbox Debian Repository <<<<"
135140
echo -e "## Virtualbox\ndeb [arch=amd64] http://download.virtualbox.org/virtualbox/debian $(lsb_release -cs) contrib" | tee /etc/apt/sources.list.d/virtualbox.list >/dev/null
136141

137142
echo ">>>> Updating Oracle Virtualbox Debian Repository index <<<<"
138143
${APT} update
139-
echo ">>>> Installing build-essential pwgen and curl <<<<"
140-
${APT} install build-essential pwgen curl
144+
echo ">>>> Installing build-essential and pwgen <<<<"
145+
${APT} install build-essential pwgen
141146

142147
echo ">>>> Stop vbox services <<<<"
143148
systemctl --no-pager stop vboxdrv.service vboxautostart-service.service vboxweb-service.service || true
@@ -175,8 +180,8 @@ EOT
175180
if [ "${INSTALL_EXTPACK}" = true ]; then
176181
echo ">>>> Installing latest VBox Extension Pack <<<<"
177182
cd /tmp
178-
version=$(wget -qO- https://download.virtualbox.org/virtualbox/LATEST.TXT)
179-
wget -c "https://download.virtualbox.org/virtualbox/${version}/Oracle_VM_VirtualBox_Extension_Pack-${version}.vbox-extpack"
183+
version=$(curl -s https://download.virtualbox.org/virtualbox/LATEST.TXT)
184+
curl -s "https://download.virtualbox.org/virtualbox/${version}/Oracle_VM_VirtualBox_Extension_Pack-${version}.vbox-extpack"
180185
echo ${ACCEPT_ORACLE_EXTPACK_LICENSE} | vboxmanage extpack install "Oracle_VM_VirtualBox_Extension_Pack-${version}.vbox-extpack"
181186
rm "Oracle_VM_VirtualBox_Extension_Pack-${version}.vbox-extpack"
182187
cd -
@@ -447,7 +452,7 @@ EOT
447452
PHPVBOX_VERSION=$(echo $RELEASE_TAG_URL | awk -F/ '{print $8}')
448453
fi
449454
cd /tmp
450-
wget -c https://github.com/phpvirtualbox/phpvirtualbox/archive/${PHPVBOX_VERSION}.tar.gz
455+
curl -c https://github.com/phpvirtualbox/phpvirtualbox/archive/${PHPVBOX_VERSION}.tar.gz -o ${PHPVBOX_VERSION}.tar.gz
451456
mkdir -p "${PHPVBOX_INSTALL_DIR}"
452457
chgrp ${VBOX_GROUP} "${PHPVBOX_INSTALL_DIR}"
453458
cd "${PHPVBOX_INSTALL_DIR}"

0 commit comments

Comments
 (0)