Skip to content

Commit d162488

Browse files
committed
Change installation way of ondrej php repository.
1 parent 71c133a commit d162488

File tree

1 file changed

+16
-4
lines changed

1 file changed

+16
-4
lines changed

install/hst-migration.sh

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -88,10 +88,21 @@ if [ -f /usr/local/vesta/conf/vesta.conf ]; then
8888
rm /etc/apt/sources.list.d/vesta.list*
8989
fi
9090

91-
# Installing sury php repo
92-
echo "deb https://packages.sury.org/php/ $codename main" > $apt/php.list
93-
wget https://packages.sury.org/php/apt.gpg -O /tmp/php_signing.key
94-
apt-key add /tmp/php_signing.key
91+
if [ "$type" = "debian" ]; then
92+
# Installing sury php repo
93+
echo "deb https://packages.sury.org/php/ $codename main" > $apt/php.list
94+
wget https://packages.sury.org/php/apt.gpg -O /tmp/php_signing.key
95+
apt-key add /tmp/php_signing.key
96+
fi
97+
98+
if [ "$type" = "ubuntu" ]; then
99+
# Check if apt-add-repository is installed
100+
if [ ! -e '/usr/bin/apt-add-repository' ]; then
101+
apt-get -y install python-software-properties
102+
check_result $? "Can't install python-software-properties"
103+
fi
104+
add-apt-repository -y ppa:ondrej/php > /dev/null 2>&1
105+
fi
95106

96107
# Installing hestia repo
97108
echo "deb https://$RHOST/ $codename main" > $apt/hestia.list
@@ -107,6 +118,7 @@ rm -fr /usr/local/vesta/softaculous
107118
sed -i '/SOFTACULOUS/d' /usr/local/vesta/conf/vesta.conf
108119

109120
# Move Vesta to Hestia Folder
121+
mv /etc/profile.d/vesta.sh /etc/profile.d/hestia.sh
110122
mv /usr/local/vesta $HESTIA
111123
mv $HESTIA/conf/vesta.conf $HESTIA/conf/hestia.conf
112124

0 commit comments

Comments
 (0)