recompute config files (sh and py) from xml
authorThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Mon, 4 Jan 2010 20:38:05 +0000 (20:38 +0000)
committerThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Mon, 4 Jan 2010 20:38:05 +0000 (20:38 +0000)
sfa/init.d/sfa

index 06051b0..b7e4b7a 100755 (executable)
 # $URL$
 #
 
+# recompute /etc/sfa/sfa_config from the xml files
+# not too sure this is the right place, should probably be done by sfa-config-tty..
+xml_files="/etc/sfa/default_config.xml"
+[ -f /etc/sfa/configs/site.xml ] && xml_files="$xml_files /etc/sfa/configs/site.xml"
+plc-config --shell  $xml_files > /etc/sfa/sfa_config
+plc-config --python $xml_files > /etc/sfa/sfa_config.py
+
 # Source config
 . /etc/sfa/sfa_config