Skip to content

Instantly share code, notes, and snippets.

@Linkaan
Created December 29, 2015 14:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Linkaan/0d7c3f95f6e7644c2bf0 to your computer and use it in GitHub Desktop.
Save Linkaan/0d7c3f95f6e7644c2bf0 to your computer and use it in GitHub Desktop.
#!/bin/sh
# Try to bring picam up when an interface comes up.
# Don't bother to do anything for lo.
if [ "$IFACE" = lo ]; then
exit 0
fi
# Only run from ifup.
if [ "$MODE" != start ]; then
exit 0
fi
# we only care about inet and inet6.
case $ADDRFAM in
inet|inet6|NetworkManager)
;;
*)
exit 0
;;
esac
# start the service
invoke-rc.d picam start >/dev/null
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment