You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
42 lines
1.0 KiB
42 lines
1.0 KiB
1 year ago
|
#!/bin/bash
|
||
|
|
||
|
branch=${1-main}
|
||
|
|
||
|
if [ -f "/etc/redhat-release" ]; then
|
||
|
dnf -y install curl wget
|
||
|
else
|
||
|
apt -y install curl wget
|
||
|
fi
|
||
|
|
||
|
curl https://raw.githubusercontent.com/hestiacp/hestiacp/$branch/src/hst_autocompile.sh > /tmp/hst_autocompile.sh
|
||
|
chmod +x /tmp/hst_autocompile.sh
|
||
|
|
||
|
mkdir -p /opt/hestiacp
|
||
|
|
||
|
# Building Hestia
|
||
|
if bash /tmp/hst_autocompile.sh --hestia --noinstall --keepbuild $branch; then
|
||
|
if [ -f "/etc/redhat-release" ]; then
|
||
|
cp /tmp/hestiacp-src/rpm/*.rpm /opt/hestiacp/
|
||
|
else
|
||
|
cp /tmp/hestiacp-src/deb/*.deb /opt/hestiacp/
|
||
|
fi
|
||
|
fi
|
||
|
|
||
|
# Building PHP
|
||
|
if bash /tmp/hst_autocompile.sh --php --noinstall --keepbuild $branch; then
|
||
|
if [ -f "/etc/redhat-release" ]; then
|
||
|
cp /tmp/hestiacp-src/rpm/*.rpm /opt/hestiacp/
|
||
|
else
|
||
|
cp /tmp/hestiacp-src/deb/*.deb /opt/hestiacp/
|
||
|
fi
|
||
|
fi
|
||
|
|
||
|
# Building NGINX
|
||
|
if bash /tmp/hst_autocompile.sh --nginx --noinstall --keepbuild $branch; then
|
||
|
if [ -f "/etc/redhat-release" ]; then
|
||
|
cp /tmp/hestiacp-src/rpm/*.rpm /opt/hestiacp/
|
||
|
else
|
||
|
cp /tmp/hestiacp-src/deb/*.deb /opt/hestiacp/
|
||
|
fi
|
||
|
fi
|