build files for making podman containers
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

22 lines
439 B

#!/bin/bash
mode_get() {
mode=$(nc-occ maintenance:mode | cut -d' ' -f 5)
if [[ $mode == "enabled" || $mode == "disabled" ]]; then
echo $mode
return 0
else
echo "Error: failed to get maintenance mode" 1>&2
return 1
fi
}
mode_on() {
nc-occ maintenance:mode --on
}
mode_off() {
if [[ $mode == "disabled" ]]; then
nc-occ maintenance:mode --off
fi
}