termproxy: cmd: support upgrade
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
14291179ce
commit
3d3670d786
@ -123,7 +123,13 @@ async fn termproxy(
|
||||
}
|
||||
}
|
||||
Some("upgrade") => {
|
||||
bail!("upgrade is not supported yet");
|
||||
if userid != "root@pam" {
|
||||
bail!("only root@pam can upgrade");
|
||||
}
|
||||
// TODO: add nicer/safer wrapper like in PVE instead
|
||||
command.push("sh");
|
||||
command.push("-c");
|
||||
command.push("apt full-upgrade; bash -l");
|
||||
}
|
||||
_ => bail!("invalid command"),
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user