Skip to content

Commit c23e08c

Browse files
committed
fix: do not attempt ps if viseron already exited
Avoid errors like this: > [viseron-finish] Viseron exit code 256 > [viseron-finish] Shutdown completed at Sat Jun 20 18:53:38 CEST 2026 > > [viseron-finish] Viseron received signal 9 > [cont-finish.d] executing container finish scripts... > [cont-finish.d] 10-postgres: executing... > Wait for Viseron to stop... > error: list of process IDs must follow -p > > Usage: > ps [options] > > Try 'ps --help <simple|list|output|threads|misc|all>' > or 'ps --help <s|l|o|t|m|a>' > for additional help text. > > For more details see ps(1). > Viseron has stopped! >
1 parent 404f547 commit c23e08c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

rootfs/etc/cont-finish.d/10-postgres

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ fi
1010

1111
log_info "Wait for Viseron to stop..."
1212
PID=$(pgrep -f ^viseron)
13-
while ps -p $PID > /dev/null; do
13+
while [ -n "$PID" ] && ps -p $PID > /dev/null; do
1414
sleep 1
1515
done
1616
log_info "Viseron has stopped!"

0 commit comments

Comments
 (0)