mirror of
https://github.com/MacRimi/ProxMenux.git
synced 2025-07-06 07:26:53 +00:00
Update install_coral_lxc.sh
This commit is contained in:
parent
70921223f9
commit
80e18586ed
@ -75,12 +75,22 @@ select_container() {
|
||||
}
|
||||
|
||||
|
||||
# Validate that the selected container is valid
|
||||
validate_container_id() {
|
||||
if [ -z "$CONTAINER_ID" ]; then
|
||||
msg_error "$(translate 'Container ID not defined. Make sure to select a container first.')"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Check if the container is running and stop it before configuration
|
||||
if pct status "$CONTAINER_ID" | grep -q "running"; then
|
||||
msg_info "$(translate 'Stopping the container before applying configuration...')"
|
||||
pct stop "$CONTAINER_ID"
|
||||
msg_ok "$(translate 'Container stopped.')"
|
||||
fi
|
||||
if [ -z "$CONTAINER_ID" ]; then
|
||||
msg_error "$(translate 'Container ID not defined. Make sure to select a container first.')"
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user