# Check if we are running in the cloud
if running_on_ec2; then
scriptname="/etc/rc.d/helper/aws-setup"
+ elif running_on_exoscale; then
+ scriptname="/etc/rc.d/helper/exoscale-setup"
elif running_on_azure; then
scriptname="/etc/rc.d/helper/azure-setup"
elif running_on_gcp; then
echo "This system is running on AWS EC2"
exit 0
+ # Check Exoscale
+ elif running_on_exoscale; then
+ echo "This system is running on Exoscale"
+ exit 0
+
# Check Microsoft
elif running_on_azure; then
echo "This system is running on Microsoft Azure"
return 1
}
+running_on_exoscale() {
+ if [ -r "/sys/devices/virtual/dmi/id/sys_vendor" ]; then
+ local sys_vendor="$(</sys/devices/virtual/dmi/id/sys_vendor)"
+
+ [ "${sys_vendor}" = "Exoscale" ] && return 0
+ fi
+
+ # We are not running on Exoscale
+ return 1
+}
+
running_on_gcp() {
# Check if the BIOS vendor is "Google"
if [ -r "/sys/devices/virtual/dmi/id/bios_vendor" ]; then