mars/systemd-testing/SYSTEMD-load-stop.sh

23 lines
337 B
Bash
Raw Normal View History

2020-12-14 19:37:58 +00:00
#!/bin/bash
# This is a trivial script for testing.
# Important: set pwd to occupy the mountpoint.
cd "$1" || exit $?
# 2-edge handshake protocol
start_flag=run-the-load.flag
running_flag=load-is-running.flag
if ! [[ -e $start_flag ]]; then
exit 0
fi
rm -f $start_flag
while [[ -e $running_flag ]]; do
sleep 1
done
exit 0