debugged for change in data directory
[rrq/hourglass.git] / manager / controls.lsp
index c7172006f7955a475f11e9f11d41f6618ca4ea45..12d3fbb7154d46d2a1a1f7f895b649f60d6e9118 100644 (file)
@@ -1,4 +1,4 @@
-; Load and present ../controls.dat
+; Load and present control.dat
 
 (load "expand-string.lsp")
 
@@ -9,13 +9,14 @@
   )
 
 (constant
- 'CONTROLFILE "../control.dat"
+ 'CONTROLFILE "control.dat"
  'CONTROL (read-expr (read-file CONTROLFILE))
  'GAP (or (lookup 'gap CONTROL) 5)
  'CLIP (or (lookup 'clip CONTROL) 5)
- 'INCL (or (lookup control CONTROL) "ipset-control.lsp")
+ 'INCL (or (lookup 'control CONTROL) "ipset-control.lsp")
  'TIMES (map (fn (n) (or (assoc n CONTROL) '(1 timed (7 0) (3 0) (19 0))))
              (sequence 1 7))
+ 'NET (or (lookup 'net CONTROL) "10.0.0.0/8")
  )
 
 (setf
  end-options '()
  limit-options '()
  )
-(dotimes (h 23) (dolist (m '(0 30))
+(dotimes (h 24) (dolist (m '(0 30))
                   (push (format "%02d:%02d" h m) start-options -1)))
-(dotimes (h 23) (dolist (m '(0 30))
+(dotimes (h 24) (dolist (m '(0 30))
                   (push (format "%02d:%02d" h m) end-options -1)))
 (for (h 1 8) (dolist (m '(0 30))
                (push (format "%02d:%02d" h m) limit-options -1)))
 
+(println "Status 200 OK\nContent-Type: text/html\n\n")
 (println (expand-file "tmpl/controls-form.html" ))
 (exit 0)