Display jail IP using bastille list buil-in command

This commit is contained in:
JRGTH
2025-09-05 17:13:11 -04:00
parent afa76f6a9c
commit ae9c3b62e5
3 changed files with 5 additions and 4 deletions

View File

@@ -3,6 +3,7 @@
====================== ======================
Version Description Version Description
1.1.46......Display jail IP using bastille list buil-in command.
1.1.45......Code update for recent bastille boot settings changes. 1.1.45......Code update for recent bastille boot settings changes.
1.1.44......Fix bastille version display under maintenance tab. 1.1.44......Fix bastille version display under maintenance tab.
1.1.43......Update: Finish adding support for 14.3 release. 1.1.43......Update: Finish adding support for 14.3 release.

View File

@@ -223,9 +223,9 @@ function get_jail_infos() {
if (!$r['id']): if (!$r['id']):
$r['id'] = "-"; $r['id'] = "-";
endif; endif;
// Set the IPv4 on the running jails. // Set the IP address on the running jails using bastille list command instead.
//$r['ip'] = exec("/usr/sbin/jls | /usr/bin/grep {$item} | /usr/bin/awk '{print $2}'"); //$r['ip'] = exec("/usr/bin/grep -w 'ip4.addr' {$jail_dir}/{$item}/jail.conf | /usr/bin/awk '{print $3}' | /usr/bin/tr -d ';'");
$r['ip'] = exec("/usr/bin/grep -w 'ip4.addr' {$jail_dir}/{$item}/jail.conf | /usr/bin/awk '{print $3}' | /usr/bin/tr -d ';'"); $r['ip'] = exec("/usr/local/bin/bastille list {$item} | awk '{print $7}' | sed 1d");
if (!$r['ip']): if (!$r['ip']):
$r['ip'] = exec("/usr/bin/grep -w 'ip6.addr' {$jail_dir}/{$item}/jail.conf | /usr/bin/awk '{print $3}' | /usr/bin/tr -d ';'"); $r['ip'] = exec("/usr/bin/grep -w 'ip6.addr' {$jail_dir}/{$item}/jail.conf | /usr/bin/awk '{print $3}' | /usr/bin/tr -d ';'");
endif; endif;

View File

@@ -1 +1 @@
1.1.45 1.1.46