]>
git.proxmox.com Git - pmg-api.git/blob - src/bin/pmgbanner
10 sub detect_container
{
13 if (-f
'/run/systemd/container') {
14 $ct = PVE
::Tools
::file_read_firstline
('/run/systemd/container');
19 my $nodename = PVE
::INotify
::nodename
();
20 my $localip = eval { PMG
::Cluster
::remote_node_ip
($nodename, 1) };
21 if (my $err = $@) { # FIXME: HACK: cope better with managed CTs and DHCP
22 my $in_ct = detect_container
();
24 warn "ignore failure to get local IP of $nodename, we're in a container ($in_ct)\n";
25 $localip = '<uknown>';
33 $banner .= <<__EOBANNER;
37 Welcome to the Proxmox Mail Gateway. Please use your web browser to
38 configure this server - connect to:
40 https://${localip}:8006/
48 open(ISSUE
, ">/etc/issue");