rc.halt.common 461 Bytes
Newer Older
1 2
#!/bin/sh

3
# run beep sequence if enabled
4
/usr/local/sbin/beep.sh stop
5

6 7 8
# shutdown syshook / plugin scripts
/usr/local/etc/rc.syshook stop

9 10 11 12 13
# shutdown rc scripts
/usr/local/etc/rc.opnsense stop

# backup volatile internals
/usr/local/etc/rc.backup_dhcpleases
14
/usr/local/etc/rc.backup_rrd
15 16 17

# wait for config lock to release
php -a >/dev/null  << EOF
18
\$fp = fopen('/conf/config.xml', "a+");
19 20 21 22 23
if (flock(\$fp, LOCK_EX)) {
	flock(\$fp, LOCK_UN);
	fclose(\$fp);
}
EOF