Skip to content

Instantly share code, notes, and snippets.

@bakman2
Last active November 10, 2019 12:32
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bakman2/dcfe3fdfd02c9ff8326bbf35da539f27 to your computer and use it in GitHub Desktop.
Save bakman2/dcfe3fdfd02c9ff8326bbf35da539f27 to your computer and use it in GitHub Desktop.
pihole startup
#!/bin/sh
. /etc.defaults/rc.subr
case $1 in
start)
/var/packages/debian-chroot/scripts/start-stop-status start
chroot /volume1/@appstore/debian-chroot/var/chroottarget service cron start
chroot /volume1/@appstore/debian-chroot/var/chroottarget service dnsmasq start
chroot /volume1/@appstore/debian-chroot/var/chroottarget service lighttpd start
chroot /volume1/@appstore/debian-chroot/var/chroottarget service pihole-FTL start
;;
stop)
chroot /volume1/@appstore/debian-chroot/var/chroottarget service cron stop
chroot /volume1/@appstore/debian-chroot/var/chroottarget service dnsmasq stop
chroot /volume1/@appstore/debian-chroot/var/chroottarget service lighttpd stop
chroot /volume1/@appstore/debian-chroot/var/chroottarget service pihole-FTL stop
/var/packages/debian-chroot/scripts/start-stop-status stop
;;
restart)
$0 stop
sleep 1
$0 start
;;
*)
echo "Usage: $0 start|stop|restart"
;;
esac
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment