diff --git a/CHANGELOG.md b/CHANGELOG.md index 9b50474..963d340 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,16 @@ # Change Log +## 20200905-3 + +- Update inotify to use configured path for albums instead of being hard coded + +## 20200827-1 through 20200905-2 + +- Full bring up of main config UI +- Additional 'advanced' configuration available via config file +- Fan management daemon +- inotify dameon for watching the main photos storage for changes and restarting slideshow as appropriate + ## 20200826-1 - Initial bring up of the wifi configuration utility diff --git a/cmd/inotify/inotify.go b/cmd/inotify/inotify.go index 3401c35..fa327ba 100644 --- a/cmd/inotify/inotify.go +++ b/cmd/inotify/inotify.go @@ -7,16 +7,21 @@ import ( "github.com/dietsche/rfsnotify" + "git.kemonine.info/PiFrame/config" "git.kemonine.info/PiFrame/watchdog" ) const ( CMD_SYSTEMCTL = "/usr/bin/systemctl" - PATH_PICTURES = "/tank/pictures" TIMEOUT = 5 * time.Second ) func main() { + // Load the config file + pfConfig, _ := config.LoadConfig() + + PATH_PICTURES := pfConfig.String(config.CONFIG_KEY_ALBUMS_ROOT) + // Create watchdog timer that restarts pf-ui.service on timeout watchdog := watchdog.New(TIMEOUT, func() { err := exec.Command(CMD_SYSTEMCTL, "restart", "pf-ui.service").Run()