fixed
authorThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Tue, 5 Jan 2010 11:51:59 +0000 (11:51 +0000)
committerThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Tue, 5 Jan 2010 11:51:59 +0000 (11:51 +0000)
sfa/init.d/sfa

index 4b77177..1cae56e 100755 (executable)
@@ -29,14 +29,14 @@ reload ()
        /etc/sfa/configs/site.xml
     )
     for file in "${files[@]}" ; do
-       if [ -n "$force" -o $file -nt /etc/sfa/plc_config.xml ] ; then
-           tmp=$(mktemp /tmp/plc_config.xml.XXXXXX)
+       if [ -n "$force" -o $file -nt /etc/sfa/sfa_config.xml ] ; then
+           tmp=$(mktemp /tmp/sfa_config.xml.XXXXXX)
            plc-config --xml "${files[@]}" >$tmp
            if [ $? -eq 0 ] ; then
-               mv $tmp /etc/sfa/plc_config.xml
-               chmod 444 /etc/sfa/plc_config.xml
+               mv $tmp /etc/sfa/sfa_config.xml
+               chmod 444 /etc/sfa/sfa_config.xml
            else
-               echo "PLC: Warning: Invalid configuration file(s) detected"
+               echo "SFA: Warning: Invalid configuration file(s) detected"
                rm -f $tmp
            fi
            break
@@ -44,16 +44,16 @@ reload ()
     done
 
     # Convert configuration to various formats
-    if [ -n "$force" -o /etc/sfa/plc_config.xml -nt /etc/sfa/plc_config ] ; then
-       plc-config --shell >/etc/sfa/plc_config
+    if [ -n "$force" -o /etc/sfa/sfa_config.xml -nt /etc/sfa/sfa_config ] ; then
+       plc-config --shell /etc/sfa/sfa_config.xml >/etc/sfa/sfa_config
     fi
-    if [ -n "$force" -o /etc/sfa/plc_config.xml -nt /etc/sfa/plc_config.py ] ; then
-       plc-config --python >/etc/sfa/plc_config.py
-    fi
-    if [ -n "$force" -o /etc/sfa/plc_config.xml -nt /etc/sfa/php/plc_config.php ] ; then
-       mkdir -p /etc/sfa/php
-       plc-config --php >/etc/sfa/php/plc_config.php
+    if [ -n "$force" -o /etc/sfa/sfa_config.xml -nt /etc/sfa/sfa_config.py ] ; then
+       plc-config --python /etc/sfa/sfa_config.xml >/etc/sfa/sfa_config.py
     fi
+#    if [ -n "$force" -o /etc/sfa/sfa_config.xml -nt /etc/sfa/php/sfa_config.php ] ; then
+#      mkdir -p /etc/sfa/php
+#      plc-config --php  /etc/sfa/sfa_config.xml >/etc/sfa/php/sfa_config.php
+#    fi
 }
 
 start() {