* Thu Oct 30 2025 Jean-Philippe Pialasse <jpp@koozali.org> 0.2-22.sme

- remove sv files, rewrite systemd unit [SME: 11517]
- remove /var/log/httpd-bkpc/ [SME: 12197]
- remove logfiles2timestamp [SME: 12196]
This commit is contained in:
2025-10-30 17:42:27 -04:00
parent ec6b312c35
commit b2ab500ef3
7 changed files with 25 additions and 62 deletions

View File

@@ -53,6 +53,7 @@ foreach (qw(
access_compat
authn_core
authz_core
systemd
))
{
next unless -f "/usr/lib/httpd/modules/mod_${_}.so" ||

View File

@@ -3,9 +3,19 @@ Description=BackupPC web page
After=network.target
[Service]
Type=forking
#PIDFile=/run/bandwidthd.pid
ExecStart=/var/service/httpd-bkpc/run
Type=notify
ExecStartPre=/sbin/e-smith/service-status httpd-bkpc
ExecStartPre=/sbin/e-smith/expand-template /etc/httpd/bkpc-conf/httpd.conf
ExecStart=/usr/sbin/httpd -f /etc/httpd/bkpc-conf/httpd.conf -DFOREGROUND
ExecReload=/usr/sbin/httpd -f /etc/httpd/bkpc-conf/httpd.conf -k graceful
ExecStop=/bin/kill -WINCH ${MAINPID}
# We want systemd to give httpd some time to finish gracefully, but still want
# it to kill httpd after TimeoutStopSec if something went wrong during the
# graceful stop. Normally, Systemd sends SIGTERM signal right after the
# ExecStop, which would kill httpd. We are sending useless SIGCONT here to give
# httpd time to finish.
KillSignal=SIGCONT
PrivateTmp=true
[Install]
WantedBy=sme-server.target

View File

@@ -39,11 +39,10 @@ sub main {
my $c = shift;
$c->app->log->info($c->log_req);
$cdb = esmith::ConfigDB::UTF8->open || die "Couldn't open config db";
$adb = esmith::AccountsDB::UTF8->open || die "Couldn't open accounts db";
my $url = "https://".$c->session->{'SystemName'}.".".$c->session->{"DomainName"}."/BackupPC";
$cdb = esmith::ConfigDB::UTF8->open || die "Couldn't open config db";
$adb = esmith::AccountsDB::UTF8->open || die "Couldn't open accounts db";
my $host = $c->req->url->to_abs->host;
my $url = "https://$host/BackupPC";
$c->stash(url => $url );
$c->render(template => 'backuppc');
@@ -72,4 +71,4 @@ sub get_backuppc {
return $out;
}
1;
1;

View File

@@ -1,27 +0,0 @@
#!/bin/sh
#----------------------------------------------------------------------
# copyright (C) 2005 Mitel Networks Corporation
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
# Technical support for this program is available from Mitel Networks
# Please visit our web site www.mitel.com/sme/ for details.
#----------------------------------------------------------------------
exec \
/usr/local/bin/setuidgid smelog \
/usr/local/bin/multilog t s5000000 \
/var/log/httpd-bkpc

View File

@@ -1,12 +0,0 @@
#!/bin/sh
#----------------------------------------------------------------------
# copyright (C) 1999-2004 Mitel Networks Corporation
#----------------------------------------------------------------------
config=/etc/httpd/bkpc-conf/httpd.conf
[ -e $config ] || exit 1
exec 2>&1
exec chpst -P /usr/sbin/httpd -f $config -D FOREGROUND&