mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-22 00:42:59 +02:00
gcloud: Add function to detect whether we are running on GCP
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
This commit is contained in:
@@ -1296,4 +1296,12 @@ sub running_on_ec2() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
sub running_on_gcp() {
|
||||
if (-e "/var/run/gcp-instance-id") {
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
1;
|
||||
|
||||
Reference in New Issue
Block a user