Merge branch 'master' into 7478-anm-spot-instances
[arvados.git] / tools / arvbox / lib / arvbox / docker / runit / 3
1 #!/bin/sh
2 # Copyright (C) The Arvados Authors. All rights reserved.
3 #
4 # SPDX-License-Identifier: AGPL-3.0
5
6 exec 2>&1
7
8 PATH=/command:/sbin:/bin:/usr/sbin:/usr/bin
9
10 LAST=0
11 test -x /run/runit.reboot && LAST=6
12
13 echo 'Waiting for services to stop...'
14 sv -w196 force-stop /service/*
15 sv exit /service/*
16
17 echo 'Shutdown...'
18 /etc/init.d/rc $LAST