-
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
updated file from 2.1.0 release archives.
- Loading branch information
Showing
16 changed files
with
3,536 additions
and
5 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
#!/bin/tclsh | ||
# | ||
# (C) '2014-2018 by Uwe Langhammer | ||
# script for enabling/disabling server processes | ||
# | ||
# usage: ctl_startup <mode> <reboot> <service1> [<service2> ... <serviceN>] | ||
# mode:0..disable | ||
# mode:1..enable | ||
# | ||
load tclrega.so | ||
|
||
set mode [lindex $argv 0] | ||
set reboot_flag [lindex $argv 1] | ||
|
||
if {!($mode >= 0 && $mode <= 1) || ($argc < 3)} { | ||
puts "usage: $argv0 0|1 0|1 <service1> \[<service2> ... <serviceN>\]" | ||
exit 1 | ||
} | ||
|
||
set reboot 0 | ||
set i 0 | ||
foreach process $argv { | ||
incr i | ||
if {$i <= 2} continue | ||
|
||
foreach startscript [glob -nocomplain /etc/init.d/*$process] { | ||
# break | ||
} | ||
|
||
if {[info exists startscript] } { | ||
set fp [open $startscript r] | ||
set file_data [read $fp] | ||
set data [split $file_data "\n"] | ||
set line1 [lindex $data 0] | ||
close $fp | ||
set flag 0 | ||
if { ($mode == 0) && ($process == "HMServer") } { | ||
puts "" | ||
puts "###############################################################################" | ||
puts "## ##" | ||
puts "## Nach der Deaktivierung sind unter anderem die folgenden CCU2-Funktionen ##" | ||
puts "## nicht mehr moeglich: ##" | ||
puts "## ##" | ||
puts "## - Diagramme ##" | ||
puts "## - Gruppenfunktion (bei Heizungsthermostaten) ##" | ||
puts "## - Erstinitialisierung der SD-Karte ##" | ||
puts "## - Geraetefirmwareupdate ueber WebUI ##" | ||
puts "## - HomeMatic-IP Interface ##" | ||
puts "## ##" | ||
puts "###############################################################################" | ||
puts "" | ||
} | ||
if {[string range $line1 0 3] == "exit"} { | ||
puts "$process in $startscript disabled" | ||
if {$mode != 0} { | ||
puts "enable $process in $startscript" | ||
set flag 1 | ||
} | ||
} else { | ||
puts "$process in $startscript enabled" | ||
if {$mode == 0} { | ||
# puts "stop $process" | ||
# exec $startscript stop | ||
puts "disable $process in $startscript" | ||
set flag 1 | ||
} | ||
} | ||
|
||
if {$flag == 1} { | ||
if {!($reboot == 1)} { | ||
exec mount -o remount,rw / | ||
} | ||
puts "write $startscript" | ||
set fp [open $startscript w 0755] | ||
if {$mode != 0} { | ||
puts -nonewline $fp [join [lreplace $data 0 0] \n] | ||
} else { | ||
puts $fp "exit" | ||
puts -nonewline $fp $file_data | ||
} | ||
close $fp | ||
set reboot 1 | ||
} | ||
} else { | ||
puts "$process startscript not found!" | ||
# exit 1 | ||
} | ||
} | ||
|
||
if {($reboot == 1) && ($reboot_flag == 1)} { | ||
exec mount -o remount,ro / | ||
puts -nonewline "saving DOM..." | ||
flush stdout | ||
rega system.Save() | ||
set result [exec /usr/bin/tail -1 /etc/config/homematic.regadom] | ||
if {$result == "</dom>"} { | ||
puts " OK!" | ||
} else { | ||
puts " XML error!" | ||
exit 1 | ||
} | ||
file delete /etc/config/InterfacesList.xml | ||
puts "reboot..." | ||
exec /sbin/reboot | ||
} | ||
exit 0 |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
libusb-1.0.so.0 |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
#!/bin/tclsh | ||
# | ||
# (C) '2014-2018 by Uwe Langhammer | ||
# script for enabling/disabling server processes | ||
# | ||
# usage: ctl_startup <mode> <reboot> <service1> [<service2> ... <serviceN>] | ||
# mode:0..disable | ||
# mode:1..enable | ||
# | ||
load tclrega.so | ||
|
||
set mode [lindex $argv 0] | ||
set reboot_flag [lindex $argv 1] | ||
|
||
if {!($mode >= 0 && $mode <= 1) || ($argc < 3)} { | ||
puts "usage: $argv0 0|1 0|1 <service1> \[<service2> ... <serviceN>\]" | ||
exit 1 | ||
} | ||
|
||
set reboot 0 | ||
set i 0 | ||
foreach process $argv { | ||
incr i | ||
if {$i <= 2} continue | ||
|
||
foreach startscript [glob -nocomplain /etc/init.d/*$process] { | ||
# break | ||
} | ||
|
||
if {[info exists startscript] } { | ||
set fp [open $startscript r] | ||
set file_data [read $fp] | ||
set data [split $file_data "\n"] | ||
set line1 [lindex $data 0] | ||
close $fp | ||
set flag 0 | ||
if { ($mode == 0) && ($process == "HMServer") } { | ||
puts "" | ||
puts "###############################################################################" | ||
puts "## ##" | ||
puts "## Nach der Deaktivierung sind unter anderem die folgenden CCU2-Funktionen ##" | ||
puts "## nicht mehr moeglich: ##" | ||
puts "## ##" | ||
puts "## - Diagramme ##" | ||
puts "## - Gruppenfunktion (bei Heizungsthermostaten) ##" | ||
puts "## - Erstinitialisierung der SD-Karte ##" | ||
puts "## - Geraetefirmwareupdate ueber WebUI ##" | ||
puts "## - HomeMatic-IP Interface ##" | ||
puts "## ##" | ||
puts "###############################################################################" | ||
puts "" | ||
} | ||
if {[string range $line1 0 3] == "exit"} { | ||
puts "$process in $startscript disabled" | ||
if {$mode != 0} { | ||
puts "enable $process in $startscript" | ||
set flag 1 | ||
} | ||
} else { | ||
puts "$process in $startscript enabled" | ||
if {$mode == 0} { | ||
# puts "stop $process" | ||
# exec $startscript stop | ||
puts "disable $process in $startscript" | ||
set flag 1 | ||
} | ||
} | ||
|
||
if {$flag == 1} { | ||
if {!($reboot == 1)} { | ||
exec mount -o remount,rw / | ||
} | ||
puts "write $startscript" | ||
set fp [open $startscript w 0755] | ||
if {$mode != 0} { | ||
puts -nonewline $fp [join [lreplace $data 0 0] \n] | ||
} else { | ||
puts $fp "exit" | ||
puts -nonewline $fp $file_data | ||
} | ||
close $fp | ||
set reboot 1 | ||
} | ||
} else { | ||
puts "$process startscript not found!" | ||
# exit 1 | ||
} | ||
} | ||
|
||
if {($reboot == 1) && ($reboot_flag == 1)} { | ||
exec mount -o remount,ro / | ||
puts -nonewline "saving DOM..." | ||
flush stdout | ||
rega system.Save() | ||
set result [exec /usr/bin/tail -1 /etc/config/homematic.regadom] | ||
if {$result == "</dom>"} { | ||
puts " OK!" | ||
} else { | ||
puts " XML error!" | ||
exit 1 | ||
} | ||
file delete /etc/config/InterfacesList.xml | ||
puts "reboot..." | ||
exec /sbin/reboot | ||
} | ||
exit 0 |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Binary file not shown.
Oops, something went wrong.