Line 472: |
Line 472: |
| then configure it the SME way: | | then configure it the SME way: |
| Edit file /etc/ups/hosts.conf and add. | | Edit file /etc/ups/hosts.conf and add. |
| + | mkdir -p /etc/e-smith/templates-custom/etc/ups/hosts.conf |
| + | echo 'MONITOR UPS@localhost "local UPS"' >/etc/e-smith/templates-custom/etc/ups/hosts.conf/10localhost |
| + | expand-template /etc/ups/hosts.conf |
| | | |
− | MONITOR UPS@localhost "local UPS"
| + | Httpd template |
| | | |
− | The nut-cgi rpm contains three cgi scripts. The rpm does not install them correctly for SME however so the following modifications are needed.
| |
− |
| |
− | mkdir -p /opt/nut-cgi-bin
| |
− | chown root:www /opt/nut-cgi-bin
| |
− | mv /var/www/nut-cgi-bin/upsstats.cgi /opt/nut-cgi-bin
| |
− | mv /var/www/nut-cgi-bin/upsset.cgi /opt/nut-cgi-bin
| |
− | mv /var/www/nut-cgi-bin/upsimage.cgi /opt/nut-cgi-bin
| |
− | chown root:www /opt/nut-cgi-bin/*
| |
− | chmod 750 /opt/nut-cgi-bin/*
| |
| mkdir -p /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf | | mkdir -p /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf |
| cd /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf | | cd /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf |
Line 540: |
Line 534: |
| { | | { |
| if ((exists $nut{'URL'}) && ($nut{'URL'} ne <nowiki>''</nowiki>)) { | | if ((exists $nut{'URL'}) && ($nut{'URL'} ne <nowiki>''</nowiki>)) { |
− | $OUT .= "Alias /$nut{'URL'} /opt/nut-cgi-bin\n"; | + | $OUT .= "Alias /$nut{'URL'} /var/www/nut-cgi-bin\n"; |
| } | | } |
| } | | } |
| | | |
− | $OUT .= "Alias /nut /opt/nut-cgi-bin\n"; | + | $OUT .= "Alias /nut /var/www/nut-cgi-bin\n"; |
| | | |
| $OUT .= "\n"; | | $OUT .= "\n"; |
− | $OUT .= "<Directory /opt/nut-cgi-bin>\n"; | + | $OUT .= "<Directory /var/www/nut-cgi-bin>\n"; |
| $OUT .= " DirectoryIndex upsstats.cgi\n"; | | $OUT .= " DirectoryIndex upsstats.cgi\n"; |
| $OUT .= " Options +ExecCGI\n"; | | $OUT .= " Options +ExecCGI\n"; |