diff -urN smeserver-bandwidthd-2.0.1.2.old/createlinks smeserver-bandwidthd-2.0.1.2/createlinks --- smeserver-bandwidthd-2.0.1.2.old/createlinks 2014-06-16 16:52:43.000000000 +0100 +++ smeserver-bandwidthd-2.0.1.2/createlinks 2020-11-20 09:18:09.072861435 +0000 @@ -1,4 +1,4 @@ -#!/usr/bin/perl -w +#! /usr/bin/perl -w use esmith::Build::CreateLinks qw(:all); @@ -18,12 +18,30 @@ safe_symlink("restart", "root/etc/e-smith/events/conf-bandwidthd/services2adjust/mysql.init"); # links for rc.d from init.d - service_link_enhanced("bandwidthd", "S85", "7"); - service_link_enhanced("bandwidthd", "K45", "6"); - service_link_enhanced("bandwidthd", "K45", "0"); - service_link_enhanced("bandwidthd", "K45", "1"); +# service_link_enhanced("bandwidthd", "S85", "7"); +# service_link_enhanced("bandwidthd", "K45", "6"); +# service_link_enhanced("bandwidthd", "K45", "0"); +# service_link_enhanced("bandwidthd", "K45", "1"); safe_symlink("/etc/e-smith/templates-default/template-begin-php", "root/etc/e-smith/templates/var/www/bandwidthd/phphtdocs/config.conf/template-begin"); safe_symlink("/etc/e-smith/templates-default/template-end-php", "root/etc/e-smith/templates/var/www/bandwidthd/phphtdocs/config.conf/template-end"); -safe_symlink("../../../functions/bandwidthd", "root/etc/e-smith/web/panels/manager/cgi-bin/bandwidthd"); +safe_symlink("../../../functions/wrapper", "root/etc/e-smith/web/panels/manager/cgi-bin/bandwidthd"); + +# rpm update action (invoked by yum on install and update +event_actions("smeserver-bandwidthd-update", qw( + bandwidthd-enable 20 + bandwidthd-start 30 +)); + +event_templates("smeserver-bandwidthd-update", qw( + /etc/httpd/conf/httpd.conf + /etc/crontab +)); + +event_services("smeserver-bandwidthd-update", qw( + httpd-e-smith sigusr1 + php-fpm reload +)); + + diff -urN smeserver-bandwidthd-2.0.1.2.old/root/etc/e-smith/events/actions/bandwidthd-enable smeserver-bandwidthd-2.0.1.2/root/etc/e-smith/events/actions/bandwidthd-enable --- smeserver-bandwidthd-2.0.1.2.old/root/etc/e-smith/events/actions/bandwidthd-enable 1970-01-01 01:00:00.000000000 +0100 +++ smeserver-bandwidthd-2.0.1.2/root/etc/e-smith/events/actions/bandwidthd-enable 2020-11-19 16:04:39.431994277 +0000 @@ -0,0 +1,2 @@ +#/bin/sh +systemctl enable bandwidthd.service diff -urN smeserver-bandwidthd-2.0.1.2.old/root/etc/e-smith/events/actions/bandwidthd-start smeserver-bandwidthd-2.0.1.2/root/etc/e-smith/events/actions/bandwidthd-start --- smeserver-bandwidthd-2.0.1.2.old/root/etc/e-smith/events/actions/bandwidthd-start 1970-01-01 01:00:00.000000000 +0100 +++ smeserver-bandwidthd-2.0.1.2/root/etc/e-smith/events/actions/bandwidthd-start 2020-11-19 16:05:31.800491288 +0000 @@ -0,0 +1,2 @@ +#!/bin/sh +systemctl start bandwidthd.service diff -urN smeserver-bandwidthd-2.0.1.2.old/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/86bandwidthd smeserver-bandwidthd-2.0.1.2/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/86bandwidthd --- smeserver-bandwidthd-2.0.1.2.old/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/86bandwidthd 2014-06-16 16:52:43.000000000 +0100 +++ smeserver-bandwidthd-2.0.1.2/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/86bandwidthd 2020-11-19 14:28:41.550736403 +0000 @@ -59,8 +59,14 @@ $OUT .= "\n"; $OUT .= "\n"; $OUT .= " AddType application/x-httpd-php .php .conf\n"; - $OUT .= " php_admin_value open_basedir /var/www/bandwidthd/htdocs\n"; - $OUT .= " SSLRequireSSL\n"; + + #$OUT .= " AddType application/x-httpd-php .php .conf\n"; + #$OUT .= " php_admin_value open_basedir /var/www/bandwidthd/htdocs\n"; + + $OUT .= "\n"; + $OUT .= "SetHandler \"proxy:unix:/var/run/php-fpm/php$version.sock|fcgi://localhost\"\n"; + $OUT .= "\n"; + $OUT .= " Options None\n"; $OUT .= " order deny,allow\n"; $OUT .= " deny from all\n"; @@ -94,8 +100,15 @@ $OUT .= "\n"; $OUT .= "\n"; - $OUT .= " AddType application/x-httpd-php .php .conf\n"; - $OUT .= " php_admin_value open_basedir /var/www/bandwidthd/phphtdocs\n"; + + #$OUT .= " AddType application/x-httpd-php .php .conf\n"; + #$OUT .= " php_admin_value open_basedir /var/www/bandwidthd/htdocs\n"; + + $OUT .= "\n"; + $OUT .= "SetHandler \"proxy:unix:/var/run/php-fpm/php$version.sock|fcgi://localhost\"\n"; + $OUT .= "\n"; + + $OUT .= " SSLRequireSSL\n"; $OUT .= " Options None\n"; $OUT .= " order deny,allow\n";