#!/bin/sh
exec 2>&1
dir=/etc/s6-rc/scripts/rc-local
if [ -d "$dir" ]; then
	# reverse lexical order for stop
	for f in $(ls -r "$dir"/*.stop 2>/dev/null); do
		[ -x "$f" ] || continue
		echo "rc.local: running $f"
		"$f" || true
	done
fi
if [ -x /etc/rc.shutdown ]; then
	/etc/rc.shutdown || true
fi
exit 0
