pihole - disable with custom time
Closed this issue · 0 comments
devmatteini commented
Right now pihole::disable
disable the pihole server indefinitely, but it's possibile to tell the server for how much time we want it to be disabled.
API
The new api should look like pihole::disable(config: &PiHoleConfig, time: Option<?>)
.
When the time is None
the pihole will be disabled indefinitely.
The time passed to the request must be converted to seconds as the pihole API says.
CLI
Command::Disable
must have a new optional flag -t, --time
which can be used to set the time.