Update raptor config and cronjobs
parent
bab5554cfe
commit
a2aea6a4d1
|
@ -1,5 +1,7 @@
|
||||||
|
|
||||||
USING: namespaces unix.linux.if unix.linux.ifreq unix.linux.route ;
|
USING: namespaces threads
|
||||||
|
unix.process unix.linux.if unix.linux.ifreq unix.linux.route
|
||||||
|
raptor.cron ;
|
||||||
|
|
||||||
IN: raptor
|
IN: raptor
|
||||||
|
|
||||||
|
@ -24,9 +26,12 @@ IN: raptor
|
||||||
configure-route
|
configure-route
|
||||||
] networking-hook set-global
|
] networking-hook set-global
|
||||||
|
|
||||||
|
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||||
|
! boot-hook
|
||||||
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||||
|
|
||||||
[
|
[
|
||||||
|
start-wait-loop
|
||||||
|
|
||||||
! rcS.d
|
! rcS.d
|
||||||
|
|
||||||
|
@ -76,11 +81,17 @@ IN: raptor
|
||||||
"rmnologin" start-service
|
"rmnologin" start-service
|
||||||
|
|
||||||
schedule-cron-jobs
|
schedule-cron-jobs
|
||||||
start-listeners
|
|
||||||
start-gettys
|
[ [ "/dev/tty2" tty-listener ] forever ] in-thread
|
||||||
|
[ [ "/dev/tty3" tty-listener ] forever ] in-thread
|
||||||
|
[ [ "/dev/tty4" tty-listener ] forever ] in-thread
|
||||||
|
[ [ "/dev/tty5" getty ] forever ] in-thread
|
||||||
|
[ [ "/dev/tty6" getty ] forever ] in-thread
|
||||||
|
|
||||||
] boot-hook set-global
|
] boot-hook set-global
|
||||||
|
|
||||||
|
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||||
|
! reboot-hook
|
||||||
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||||
|
|
||||||
[
|
[
|
||||||
|
@ -108,6 +119,8 @@ IN: raptor
|
||||||
"reboot" stop-service
|
"reboot" stop-service
|
||||||
] reboot-hook set-global
|
] reboot-hook set-global
|
||||||
|
|
||||||
|
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||||
|
! shutdown-hook
|
||||||
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||||
|
|
||||||
[
|
[
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
|
|
||||||
USING: kernel threads arrays sequences combinators.cleave raptor raptor.cron ;
|
USING: kernel namespaces threads arrays sequences combinators.cleave
|
||||||
|
raptor raptor.cron ;
|
||||||
|
|
||||||
IN: raptor
|
IN: raptor
|
||||||
|
|
||||||
|
@ -7,41 +8,33 @@ IN: raptor
|
||||||
|
|
||||||
: fork-exec-args-wait ( args -- ) [ first ] [ ] bi fork-exec-wait ;
|
: fork-exec-args-wait ( args -- ) [ first ] [ ] bi fork-exec-wait ;
|
||||||
|
|
||||||
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
: run-script ( path -- ) 1array [ fork-exec-args-wait ] curry in-thread ;
|
||||||
|
|
||||||
: cron-hourly ( -- ) ;
|
|
||||||
|
|
||||||
: cron-daily ( -- )
|
|
||||||
{ "/etc/cron.daily/apt"
|
|
||||||
"/etc/cron.daily/aptitude"
|
|
||||||
"/etc/cron.daily/bsdmainutils"
|
|
||||||
"/etc/cron.daily/find.notslocate"
|
|
||||||
"/etc/cron.daily/logrotate"
|
|
||||||
"/etc/cron.daily/man-db"
|
|
||||||
"/etc/cron.daily/ntp-server"
|
|
||||||
"/etc/cron.daily/slocate"
|
|
||||||
"/etc/cron.daily/standard"
|
|
||||||
"/etc/cron.daily/sysklogd"
|
|
||||||
"/etc/cron.daily/tetex-bin" }
|
|
||||||
[ 1array [ fork-exec-args-wait ] in-thread drop ] each ;
|
|
||||||
|
|
||||||
: cron-weekly ( -- )
|
|
||||||
{ "/etc/cron.weekly/cvs"
|
|
||||||
"/etc/cron.weekly/man-db"
|
|
||||||
"/etc/cron.weekly/ntp-server"
|
|
||||||
"/etc/cron.weekly/popularity-contest"
|
|
||||||
"/etc/cron.weekly/sysklogd" }
|
|
||||||
[ 1array [ fork-exec-args-wait ] in-thread drop ] each ;
|
|
||||||
|
|
||||||
: cron-monthly ( -- )
|
|
||||||
{ "/etc/cron.monthly/scrollkeeper"
|
|
||||||
"/etc/cron.monthly/standard" }
|
|
||||||
[ 1array [ fork-exec-args-wait ] in-thread drop ] each ;
|
|
||||||
|
|
||||||
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||||
|
|
||||||
: schedule-cron-jobs ( -- )
|
[
|
||||||
{ 17 } f f f f <when> [ cron-hourly ] schedule
|
"/etc/cron.daily/apt" run-script
|
||||||
{ 25 } { 6 } f f f <when> [ cron-daily ] schedule
|
"/etc/cron.daily/aptitude" run-script
|
||||||
{ 47 } { 6 } f f { 7 } <when> [ cron-weekly ] schedule
|
"/etc/cron.daily/bsdmainutils" run-script
|
||||||
{ 52 } { 6 } { 1 } f f <when> [ cron-monthly ] schedule ;
|
"/etc/cron.daily/find.notslocate" run-script
|
||||||
|
"/etc/cron.daily/logrotate" run-script
|
||||||
|
"/etc/cron.daily/man-db" run-script
|
||||||
|
"/etc/cron.daily/ntp-server" run-script
|
||||||
|
"/etc/cron.daily/slocate" run-script
|
||||||
|
"/etc/cron.daily/standard" run-script
|
||||||
|
"/etc/cron.daily/sysklogd" run-script
|
||||||
|
"/etc/cron.daily/tetex-bin" run-script
|
||||||
|
] cron-jobs-daily set-global
|
||||||
|
|
||||||
|
[
|
||||||
|
"/etc/cron.weekly/cvs" run-script
|
||||||
|
"/etc/cron.weekly/man-db" run-script
|
||||||
|
"/etc/cron.weekly/ntp-server" run-script
|
||||||
|
"/etc/cron.weekly/popularity-contest" run-script
|
||||||
|
"/etc/cron.weekly/sysklogd" run-script
|
||||||
|
] cron-jobs-weekly set-global
|
||||||
|
|
||||||
|
[
|
||||||
|
"/etc/cron.monthly/scrollkeeper" run-script
|
||||||
|
"/etc/cron.monthly/standard" run-script
|
||||||
|
] cron-jobs-monthly set-global
|
Loading…
Reference in New Issue