gitian-builder/libexec/stop-target
2012-04-22 10:26:39 -07:00

19 lines
346 B
Bash
Executable File

#!/bin/sh
if [ -z "$USE_LXC" ]; then
if [ ! -e var/target.pid ]; then exit; fi
on-target -u root halt
sleep 5
if [ ! -e var/target.pid ]; then exit; fi
sleep 5
if [ ! -e var/target.pid ]; then exit; fi
echo Killing target since it did not shutdown within 10 seconds
kill `cat var/target.pid`
else
true
fi