projects
/
rrq
/
hourglass.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
set up default target
[rrq/hourglass.git]
/
manager
/
controls.lsp
diff --git
a/manager/controls.lsp
b/manager/controls.lsp
index 60c00b5148ee19976c3d0d6286de0997b0b79496..10153dfdf5eb65f4e25bdcedf3d0990180a94d13 100644
(file)
--- a/
manager/controls.lsp
+++ b/
manager/controls.lsp
@@
-2,6
+2,10
@@
(load "expand-string.lsp")
(load "expand-string.lsp")
+(constant
+ 'CONTROLFILE SITE:control.dat
+ )
+
(setf UPDATE "")
(when (= (env "REQUEST_METHOD") "POST")
(setf UPDATE "")
(when (= (env "REQUEST_METHOD") "POST")
@@
-9,19
+13,15
@@
)
(constant
)
(constant
- 'CONTROLFILE "control.dat"
'CONTROL (read-expr (read-file CONTROLFILE))
'GAP (or (lookup 'gap CONTROL) 5)
'CLIP (or (lookup 'clip CONTROL) 5)
'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")
'TIMES (map (fn (n) (or (assoc n CONTROL) '(1 timed (7 0) (3 0) (19 0))))
(sequence 1 7))
'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
DAYS '(0 "Mon" "Tue" "Wed" "Thu" "Fri" "Sat" "Sun")
)
(setf
DAYS '(0 "Mon" "Tue" "Wed" "Thu" "Fri" "Sat" "Sun")
- incl-options '("ipset-control.lsp")
gap-options '(0 1 2 5 10 15 30)
clip-options '(0 200 500 800 1000 1200 1500 2000)
mode-options '("opened" "timed" "closed")
gap-options '(0 1 2 5 10 15 30)
clip-options '(0 200 500 800 1000 1200 1500 2000)
mode-options '("opened" "timed" "closed")
@@
-36,5
+36,6
@@
(for (h 1 8) (dolist (m '(0 30))
(push (format "%02d:%02d" h m) limit-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)
(println (expand-file "tmpl/controls-form.html" ))
(exit 0)