Skip to content

Commit

Permalink
nc-maintenance: add is_active
Browse files Browse the repository at this point in the history
Signed-off-by: nachoparker <nacho@ownyourbits.com>
  • Loading branch information
nachoparker committed Mar 16, 2020
1 parent c49c390 commit f71c8c8
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions bin/ncp/TOOLS/nc-maintenance.sh
Expand Up @@ -9,13 +9,18 @@
# Made in Taiwan (Republic of China)
#

is_active()
{
grep -q enabled <(ncc maintenance:mode)
}

configure()
{
[[ $ACTIVE != "yes" ]] && {
[[ "$ACTIVE" != "yes" ]] && {
ncc maintenance:mode --off
return 0
return $?
}
ncc maintenance:mode --on
ncc maintenance:mode --on
}

install(){ :; }
Expand Down

0 comments on commit f71c8c8

Please sign in to comment.