这一次终于创成了,h3c堡垒机页面可以打开终端了
This commit is contained in:
parent
914e7b2e76
commit
2f2bc09f3b
@ -40,4 +40,4 @@ TITLE=$(echo $ARGS | jq -r .st)
|
||||
|
||||
echo "Will connect to $TITLE..."
|
||||
|
||||
passh -p "$PASSWORD" ssh -o StrictHostKeyChecking=no -o HostKeyAlgorithms=+ssh-rsa -p $PORT_NUM $USERNAME@$HOSTNAME
|
||||
xdg-terminal-exec passh -p "$PASSWORD" ssh -o StrictHostKeyChecking=no -o HostKeyAlgorithms=+ssh-rsa -p $PORT_NUM $USERNAME@$HOSTNAME
|
@ -1,13 +1,12 @@
|
||||
[Desktop Entry]
|
||||
Type=Application
|
||||
Version=@VERSION
|
||||
Name=Access Client
|
||||
GenericName=Access Client
|
||||
Comment=Resource monitor that shows usage and stats for processor, memory, disks, network and processes
|
||||
Comment[zh_CN]=齐治、H3C 运维审计系统连接代理
|
||||
Terminal=true
|
||||
Terminal=false
|
||||
Categories=System;ConsoleOnly;
|
||||
Keywords=system;h3c;
|
||||
NoDisplay=true
|
||||
Exec=@EXEC %u
|
||||
MimeType=application/x-accessclient;x-scheme-handler/accessclient;
|
||||
MimeType=application/x-accessclient;x-scheme-handler/accessclient;
|
||||
|
@ -1,6 +1,5 @@
|
||||
{
|
||||
stdenv,
|
||||
lib,
|
||||
|
||||
jq,
|
||||
zlib-ng,
|
||||
@ -8,6 +7,7 @@
|
||||
coreutils,
|
||||
openssh,
|
||||
which,
|
||||
xdg-terminal-exec,
|
||||
...
|
||||
}:
|
||||
let
|
||||
@ -24,6 +24,7 @@ stdenv.mkDerivation rec {
|
||||
passh
|
||||
coreutils
|
||||
openssh
|
||||
xdg-terminal-exec
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
@ -35,13 +36,13 @@ stdenv.mkDerivation rec {
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
sed "/^export PATH=/s|@PATH|${coreutils}/bin:${jq}/bin:${passh}/bin:${zlib-ng.bin}/bin:${openssh}/bin|" "${bin}" > $out/bin/${pname}
|
||||
sed "/^export PATH=/s|@PATH|${coreutils}/bin:${jq}/bin:${passh}/bin:${zlib-ng.bin}/bin:${openssh}/bin:${xdg-terminal-exec}/bin|" "${bin}" > $out/bin/${pname}
|
||||
chmod +x $out/bin/${pname}
|
||||
|
||||
mkdir -p $out/share/applications
|
||||
sed "/^Version=/s|@VERSION|${version}|" "${desktop}" | sed "/^Exec=/s|@EXEC|$out/bin/${pname}|" > "$out/share/applications/${pname}.desktop"
|
||||
cat "${desktop}" | sed "/^Exec=/s|@EXEC|$out/bin/${pname}|" > "$out/share/applications/${pname}.desktop"
|
||||
|
||||
echo "PATH: $PATH"
|
||||
which jq && which minideflate && which passh && which ssh || exit 1
|
||||
which jq && which minideflate && which passh && which ssh && which xdg-terminal-exec || exit 1
|
||||
'';
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user