Added the small support driver for the picoscope
Added a deploysics script The Tcl data and time functions were moved to the SICS kernel
This commit is contained in:
45
utils/deploysics
Executable file
45
utils/deploysics
Executable file
@@ -0,0 +1,45 @@
|
||||
#!/usr/bin/tclsh
|
||||
#----------------------------------------------------------
|
||||
# A script for deploying SICS servers easily
|
||||
#
|
||||
# Mark Koennecke, April 2015
|
||||
#----------------------------------------------------------
|
||||
|
||||
set instlist [list amor boa dmc eiger focus hrpt mars \
|
||||
morpheus narziss orion poldi rita2 sans sans2 tasp trics]
|
||||
|
||||
|
||||
proc execCommand {command} {
|
||||
puts stdout "Doing $command"
|
||||
set status [catch {eval exec $command} msg]
|
||||
if {$status != 0} {
|
||||
puts stdout "ERROR: $msg "
|
||||
}
|
||||
}
|
||||
#-----------------------------------------------------------
|
||||
proc replaceServer {inst} {
|
||||
execCommand "ssh ${inst}@${inst} monit stop sicsserver"
|
||||
execCommand "ssh ${inst}@${inst} monit stop simserver"
|
||||
execCommand "scp ./SICServer ${inst}@${inst}:${inst}_sics"
|
||||
execCommand "ssh ${inst}@${inst} updatesicscommon"
|
||||
execCommand "ssh ${inst}@${inst} monit start sicsserver"
|
||||
execCommand "ssh ${inst}@${inst} monit start simserver"
|
||||
}
|
||||
|
||||
if {[llength $argv] < 1} {
|
||||
puts stdout "usage:\n\tdeploysics instname| all"
|
||||
exit 1
|
||||
}
|
||||
|
||||
set inst [lindex $argv]
|
||||
|
||||
if {[string compare $inst all] == 0} {
|
||||
foreach inst $instlist {
|
||||
replaceServer $inst
|
||||
}
|
||||
} else {
|
||||
replaceServer $inst
|
||||
}
|
||||
|
||||
puts stdout "Done"
|
||||
|
||||
Reference in New Issue
Block a user