diff options
Diffstat (limited to 'recipes-containers/vcontainer/files/vcontainer-common.sh')
| -rwxr-xr-x | recipes-containers/vcontainer/files/vcontainer-common.sh | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/recipes-containers/vcontainer/files/vcontainer-common.sh b/recipes-containers/vcontainer/files/vcontainer-common.sh index 39e57b13..792bd7a2 100755 --- a/recipes-containers/vcontainer/files/vcontainer-common.sh +++ b/recipes-containers/vcontainer/files/vcontainer-common.sh | |||
| @@ -737,6 +737,10 @@ build_runner_args() { | |||
| 737 | [ -n "$INPUT_STORAGE" ] && args+=("--input-storage" "$INPUT_STORAGE") | 737 | [ -n "$INPUT_STORAGE" ] && args+=("--input-storage" "$INPUT_STORAGE") |
| 738 | [ "$DISABLE_KVM" = "true" ] && args+=("--no-kvm") | 738 | [ "$DISABLE_KVM" = "true" ] && args+=("--no-kvm") |
| 739 | 739 | ||
| 740 | # Add idle timeout from config | ||
| 741 | local idle_timeout=$(config_get "idle-timeout" "1800") | ||
| 742 | args+=("--idle-timeout" "$idle_timeout") | ||
| 743 | |||
| 740 | # Add port forwards (each -p adds a --port-forward) | 744 | # Add port forwards (each -p adds a --port-forward) |
| 741 | for pf in "${PORT_FORWARDS[@]}"; do | 745 | for pf in "${PORT_FORWARDS[@]}"; do |
| 742 | args+=("--port-forward" "$pf") | 746 | args+=("--port-forward" "$pf") |
| @@ -1088,10 +1092,9 @@ run_runtime_command() { | |||
| 1088 | # Check if auto-daemon is enabled | 1092 | # Check if auto-daemon is enabled |
| 1089 | local auto_daemon=$(config_get "auto-daemon" "true") | 1093 | local auto_daemon=$(config_get "auto-daemon" "true") |
| 1090 | if [ "$auto_daemon" = "true" ]; then | 1094 | if [ "$auto_daemon" = "true" ]; then |
| 1091 | # Auto-start daemon | 1095 | # Auto-start daemon (idle-timeout is included in runner_args) |
| 1092 | echo -e "${CYAN}[$VCONTAINER_RUNTIME_NAME]${NC} Starting daemon..." >&2 | 1096 | echo -e "${CYAN}[$VCONTAINER_RUNTIME_NAME]${NC} Starting daemon..." >&2 |
| 1093 | local idle_timeout=$(config_get "idle-timeout" "1800") | 1097 | "$RUNNER" $runner_args --daemon-start |
| 1094 | "$RUNNER" $runner_args --idle-timeout "$idle_timeout" --daemon-start | ||
| 1095 | 1098 | ||
| 1096 | if daemon_is_running; then | 1099 | if daemon_is_running; then |
| 1097 | # Fresh daemon has no port forwards - clear stale registry | 1100 | # Fresh daemon has no port forwards - clear stale registry |
| @@ -1136,10 +1139,9 @@ run_runtime_command_with_input() { | |||
| 1136 | # Check if auto-daemon is enabled | 1139 | # Check if auto-daemon is enabled |
| 1137 | local auto_daemon=$(config_get "auto-daemon" "true") | 1140 | local auto_daemon=$(config_get "auto-daemon" "true") |
| 1138 | if [ "$auto_daemon" = "true" ]; then | 1141 | if [ "$auto_daemon" = "true" ]; then |
| 1139 | # Auto-start daemon | 1142 | # Auto-start daemon (idle-timeout is included in runner_args) |
| 1140 | echo -e "${CYAN}[$VCONTAINER_RUNTIME_NAME]${NC} Starting daemon..." >&2 | 1143 | echo -e "${CYAN}[$VCONTAINER_RUNTIME_NAME]${NC} Starting daemon..." >&2 |
| 1141 | local idle_timeout=$(config_get "idle-timeout" "1800") | 1144 | "$RUNNER" $runner_args --daemon-start |
| 1142 | "$RUNNER" $runner_args --idle-timeout "$idle_timeout" --daemon-start | ||
| 1143 | 1145 | ||
| 1144 | if daemon_is_running; then | 1146 | if daemon_is_running; then |
| 1145 | # Fresh daemon has no port forwards - clear stale registry | 1147 | # Fresh daemon has no port forwards - clear stale registry |
