run-cjdroute.sh 462 B

12345678910111213141516171819
  1. #!/bin/sh
  2. # A script to start cjdroute with its config as an argument
  3. # Maintainer: Jack L. Frost <fbt@fleshless.org>
  4. # Functions
  5. echo() { printf '%s\n' "$*"; }
  6. usage() { echo "Usage: run-cjdroute [/path/to/cjdroute.conf] (/etc/cjdroute.conf by default)"; }
  7. err() { echo "$1" >&2; }
  8. main() {
  9. [ "$1" = '-h' -o "$1" = '--help' ] && { usage; return 0; }
  10. cjdroute_config=${1:-"/etc/cjdroute.conf"}
  11. exec cjdroute < $cjdroute_config
  12. }
  13. # DO SOMETHING
  14. main "$@"