Skip to content

Commit 9c2e5f7

Browse files
feat: Add prominent LXC creation completion message
- Enhanced Terminal component to detect LXC creation scripts - Display prominent block message when LXC creation finishes successfully - Detection based on script path (ct/), container ID, and script name patterns - Maintains backward compatibility for non-LXC scripts - Shows 'LXC CREATION FINISHED' block instead of standard completion message
1 parent 8039d5a commit 9c2e5f7

File tree

3 files changed

+84
-1
lines changed

3 files changed

+84
-1
lines changed

scripts/ct/debian.sh

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
#!/usr/bin/env bash
2+
SCRIPT_DIR="$(dirname "$0")"
3+
source "$SCRIPT_DIR/../core/build.func"
4+
# Copyright (c) 2021-2025 tteck
5+
# Author: tteck (tteckster)
6+
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
7+
# Source: https://www.debian.org/
8+
9+
APP="Debian"
10+
var_tags="${var_tags:-os}"
11+
var_cpu="${var_cpu:-1}"
12+
var_ram="${var_ram:-512}"
13+
var_disk="${var_disk:-2}"
14+
var_os="${var_os:-debian}"
15+
var_version="${var_version:-13}"
16+
var_unprivileged="${var_unprivileged:-1}"
17+
18+
header_info "$APP"
19+
variables
20+
color
21+
catch_errors
22+
23+
function update_script() {
24+
header_info
25+
check_container_storage
26+
check_container_resources
27+
if [[ ! -d /var ]]; then
28+
msg_error "No ${APP} Installation Found!"
29+
exit
30+
fi
31+
msg_info "Updating $APP LXC"
32+
$STD apt update
33+
$STD apt -y upgrade
34+
msg_ok "Updated $APP LXC"
35+
exit
36+
}
37+
38+
start
39+
build_container
40+
description
41+
42+
msg_ok "Completed Successfully!\n"
43+
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"

scripts/install/debian-install.sh

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
#!/usr/bin/env bash
2+
3+
# Copyright (c) 2021-2025 tteck
4+
# Author: tteck (tteckster)
5+
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
6+
# Source: https://www.debian.org/
7+
8+
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
9+
color
10+
verb_ip6
11+
catch_errors
12+
setting_up_container
13+
network_check
14+
update_os
15+
16+
motd_ssh
17+
customize
18+
19+
msg_info "Cleaning up"
20+
$STD apt -y autoremove
21+
$STD apt -y autoclean
22+
$STD apt -y clean
23+
msg_ok "Cleaned"
24+

src/app/_components/Terminal.tsx

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,23 @@ export function Terminal({ scriptPath, onClose, mode = 'local', server, isUpdate
239239
}
240240
break;
241241
case 'end':
242-
xtermRef.current.writeln(`${prefix}${message.data}`);
242+
// Check if this is an LXC creation script
243+
const isLxcCreation = scriptPath.includes('ct/') ||
244+
scriptPath.includes('create_lxc') ||
245+
containerId ||
246+
scriptName.includes('lxc') ||
247+
scriptName.includes('container');
248+
249+
if (isLxcCreation && message.data.includes('SSH script execution finished with code: 0')) {
250+
// Display prominent LXC creation completion message
251+
xtermRef.current.writeln('');
252+
xtermRef.current.writeln('#########################################');
253+
xtermRef.current.writeln('########## LXC CREATION FINISHED ########');
254+
xtermRef.current.writeln('#########################################');
255+
xtermRef.current.writeln('');
256+
} else {
257+
xtermRef.current.writeln(`${prefix}${message.data}`);
258+
}
243259
setIsRunning(false);
244260
break;
245261
}

0 commit comments

Comments
 (0)