Skip to content

Commit

Permalink
scripts/bindhosts: add basic help
Browse files Browse the repository at this point in the history
  • Loading branch information
backslashxx committed Dec 15, 2024
1 parent b9b7f93 commit 683bb19
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions module/bindhosts.sh
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,16 @@ illusion () {
x=$(($$%4 + 4)); while [ $x -gt 1 ] ; do echo '[.]' ; sleep 0.1 ; x=$((x-1)) ; done &
}

show_help () {
echo "usage:"
printf " --force-update \tforce an update\n"
printf " --force-reset \t\tforce a reset\n"
printf " --enable-cron \t\tenables scheduled updates (4AM daily)\n"
printf " --disable-cron \tdisables scheduled updates\n"
printf " --help \t\tdisplays this message\n"
}


enable_cron() {
[ ! -d $PERSISTENT_DIR/crontabs ] && {
mkdir $PERSISTENT_DIR/crontabs
Expand Down Expand Up @@ -217,6 +227,7 @@ case "$1" in
--enable-cron) enable_cron; exit ;;
--disable-cron) disable_cron; exit ;;
--toggle-updatejson) toggle_updatejson; exit ;;
--help) show_help; exit ;;
esac

# single instance lock
Expand Down

0 comments on commit 683bb19

Please sign in to comment.