s/pbsbanner/proxmox-backup-banner/ + move to /usr/lib
We want to avoid pbs if possible and also avoid placing internal binaries, not intended for human direct use, in /bin or /sbin paths. Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
e2b5e75a3e
commit
b69b8af26b
5
Makefile
5
Makefile
|
@ -12,12 +12,13 @@ USR_BIN := \
|
||||||
pxar
|
pxar
|
||||||
|
|
||||||
# Binaries usable by admins
|
# Binaries usable by admins
|
||||||
USR_SBIN := proxmox-backup-manager \
|
USR_SBIN := \
|
||||||
pbsbanner
|
proxmox-backup-manager
|
||||||
|
|
||||||
# Binaries for services:
|
# Binaries for services:
|
||||||
SERVICE_BIN := \
|
SERVICE_BIN := \
|
||||||
proxmox-backup-api \
|
proxmox-backup-api \
|
||||||
|
proxmox-backup-banner \
|
||||||
proxmox-backup-proxy
|
proxmox-backup-proxy
|
||||||
|
|
||||||
ifeq ($(BUILD_MODE), release)
|
ifeq ($(BUILD_MODE), release)
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
etc/proxmox-backup-proxy.service /lib/systemd/system/
|
etc/proxmox-backup-proxy.service /lib/systemd/system/
|
||||||
etc/proxmox-backup.service /lib/systemd/system/
|
etc/proxmox-backup.service /lib/systemd/system/
|
||||||
etc/pbsbanner.service /lib/systemd/system/
|
etc/proxmox-backup-banner.service /lib/systemd/system/
|
||||||
usr/lib/x86_64-linux-gnu/proxmox-backup/proxmox-backup-api
|
usr/lib/x86_64-linux-gnu/proxmox-backup/proxmox-backup-api
|
||||||
usr/lib/x86_64-linux-gnu/proxmox-backup/proxmox-backup-proxy
|
usr/lib/x86_64-linux-gnu/proxmox-backup/proxmox-backup-proxy
|
||||||
|
usr/lib/x86_64-linux-gnu/proxmox-backup/proxmox-backup-banner
|
||||||
usr/sbin/proxmox-backup-manager
|
usr/sbin/proxmox-backup-manager
|
||||||
usr/sbin/pbsbanner
|
|
||||||
usr/share/javascript/proxmox-backup/css/ext6-pbs.css
|
usr/share/javascript/proxmox-backup/css/ext6-pbs.css
|
||||||
usr/share/javascript/proxmox-backup/images/logo-128.png
|
usr/share/javascript/proxmox-backup/images/logo-128.png
|
||||||
usr/share/javascript/proxmox-backup/images/proxmox_logo.png
|
usr/share/javascript/proxmox-backup/images/proxmox_logo.png
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
include ../defines.mk
|
include ../defines.mk
|
||||||
|
|
||||||
UNITS := \
|
UNITS :=
|
||||||
pbsbanner.service \
|
|
||||||
|
|
||||||
DYNAMIC_UNITS := \
|
DYNAMIC_UNITS := \
|
||||||
|
proxmox-backup-banner.service \
|
||||||
proxmox-backup.service \
|
proxmox-backup.service \
|
||||||
proxmox-backup-proxy.service
|
proxmox-backup-proxy.service
|
||||||
|
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=Proxmox Backup Server Login Banner
|
Description=Proxmox Backup Server Login Banner
|
||||||
ConditionPathExists=/usr/sbin/pbsbanner
|
ConditionPathExists=%LIBEXECDIR%/proxmox-backup/proxmox-backup-banner
|
||||||
ConditionPathExists=!/usr/bin/pvebanner
|
ConditionPathExists=!/usr/bin/pvebanner
|
||||||
DefaultDependencies=no
|
DefaultDependencies=no
|
||||||
After=local-fs.target
|
After=local-fs.target
|
||||||
Before=console-getty.service
|
Before=console-getty.service
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
ExecStart=/usr/sbin/pbsbanner
|
ExecStart=%LIBEXECDIR%/proxmox-backup/proxmox-backup-banner
|
||||||
Type=oneshot
|
Type=oneshot
|
||||||
RemainAfterExit=yes
|
RemainAfterExit=yes
|
||||||
|
|
|
@ -8,7 +8,8 @@ fn main() {
|
||||||
let nodename = tools::nodename();
|
let nodename = tools::nodename();
|
||||||
let addr = format!("{}:8007", nodename);
|
let addr = format!("{}:8007", nodename);
|
||||||
|
|
||||||
let mut banner = format!("
|
let mut banner = format!(
|
||||||
|
"
|
||||||
{:-<78}
|
{:-<78}
|
||||||
|
|
||||||
Welcome to the Proxmox Backup Server. Please use your web browser to
|
Welcome to the Proxmox Backup Server. Please use your web browser to
|
||||||
|
@ -30,9 +31,12 @@ configure this server - connect to:
|
||||||
if !saddrs.is_empty() {
|
if !saddrs.is_empty() {
|
||||||
saddrs.join("\n")
|
saddrs.join("\n")
|
||||||
} else {
|
} else {
|
||||||
format!("hostname '{}' does not resolves to any non-loopback address", nodename)
|
format!(
|
||||||
|
"hostname '{}' does not resolves to any non-loopback address",
|
||||||
|
nodename
|
||||||
|
)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
|
||||||
Err(e) => format!("could not resolve hostname '{}': {}", nodename, e),
|
Err(e) => format!("could not resolve hostname '{}': {}", nodename, e),
|
||||||
};
|
};
|
||||||
banner += &msg;
|
banner += &msg;
|
Loading…
Reference in New Issue