Skip to content

Commit

Permalink
create and install backup.conf for svctool
Browse files Browse the repository at this point in the history
  • Loading branch information
mbhangui committed Oct 28, 2023
1 parent 71a90e9 commit d658d49
Show file tree
Hide file tree
Showing 8 changed files with 56 additions and 12 deletions.
1 change: 1 addition & 0 deletions indimail-mta-x/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -473,3 +473,4 @@ indimail-services.7
favicon.base64
filterit.1
tests/spfquery.txt
backup.conf
1 change: 1 addition & 0 deletions indimail-mta-x/ETC
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ f:root:qmail:0644:/control/:nodnscheck:nodnscheck
f:root:qmail:0644:/control/:level2-tlds:level2-tlds
f:root:qmail:0644:/control/:level3-tlds:level3-tlds
f:root:qmail:0644:/:favicon.base64:favicon.base64
f:root:qmail:0644:/:backup.conf:backup.conf
#
# Permissions for instcheck
#
Expand Down
14 changes: 8 additions & 6 deletions indimail-mta-x/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ edit = sed \
-e 's,@DATE\@,$(DATE),g'

it = 822date 822field 822header 822print 822received addrlist analyzer \
atrn autoresponder batv binm1 binm1+df binm2 binm2+df binm3 binm3+df \
bouncesaying cdb-database cdbdump cdbget cdbgetm cdbmake cdbmake-12 \
cdbmake-sv cdbstats cdbtest cidr condredirect config-fast \
create_services cronlist.q ctrlenv datemail dk-filter dknewkey \
dnsblcheck dnscname dnsfq dnsip dnsmxip dnsptr dnstlsarr dnstxt \
dot-forward drate etrn except fastforward favicon.base64 \
atrn autoresponder backup.conf batv binm1 binm1+df binm2 binm2+df \
binm3 binm3+df bouncesaying cdb-database cdbdump cdbget cdbgetm \
cdbmake cdbmake-12 cdbmake-sv cdbstats cdbtest cidr condredirect \
config-fast create_services cronlist.q ctrlenv datemail dk-filter \
dknewkey dnsblcheck dnscname dnsfq dnsip dnsmxip dnsptr dnstlsarr \
dnstxt dot-forward drate etrn except fastforward favicon.base64 \
filterit forward generic.so greydaemon home home+df hostname iftocc \
indimail-mta.changes setqload qmonitor indimail-mta.perms \
inewaliases installer instcheck ipmeprint irmail \
Expand Down Expand Up @@ -3899,6 +3899,8 @@ indimail-services.7: indimail-services.9 conf-split conf-sysconfdir \
conf-logdir
$(edit) indimail-services.9 >$@

backup.conf: backup.conf.in
(sed -n '2,$$p' warn-auto.sh;cat $@.in) | $(edit) > $@

#################################################################
indimail-mta-permissions.easy: indimail-mta-permissions.easy.in \
Expand Down
1 change: 1 addition & 0 deletions indimail-mta-x/TARGETS
Original file line number Diff line number Diff line change
Expand Up @@ -694,3 +694,4 @@ favicon.base64
filterit
filterit.o
filterit_sub.o
backup.conf
34 changes: 34 additions & 0 deletions indimail-mta-x/backup.conf.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#
# WaRNING!!! If you modify this file, it will not get
# replaced on upgrades. If you need to modify this
# file, check with upstream for new directories to
# be added along with your directory/files that you add
# here
#
# This file is used by svctool --backup option
#
/etc/alternatives
/etc/hosts
/etc/clamd.d
/etc/cron.d/cronlist.q
/etc/cron.d/cronlist.i
/etc/init.d/svscan
/etc/inittab
/etc/nsswitch.conf
/etc/passwd
/etc/group
/etc/resolv.conf
/etc/security
/etc/sysconfig/network
@qsysconfdir@
@servicedir@
/usr/lib/systemd/system/svscan.service
/usr/lib/systemd/system/svscan.service.d
/usr/lib/systemd/system/qmta-send.service
/usr/lib/systemd/system/qmta-send.service.d
@indimaildir@/alias/.qmail-*
@indimaildir@/autoturn
@indimaildir@/.bash_profile
@indimaildir@/.bashrc
@indimaildir@/domains
@indimaildir@/.indimail
3 changes: 3 additions & 0 deletions indimail-mta-x/doc/ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ Release 3.0.6-1.1 Start 25/10/2023 End XX/XX/XXXX
qmail-qmqpc.c: replace hard-coded exit values with constants from qmail.h
13. qmulti.c: unset env variables queue_env, QUEUEPROG to prevent recursion
14. qmulti.c: refactored code to handle qmail-queue consistently
- 27/10/2023
15. indimail-mta.spec, Makefile, ETC: added backup.conf for svctool backups
16. svctool: skip comments in backup.conf file

* Tue Oct 17 2023 18:34:04 +0000 Manvendra Bhangui <[email protected]> 3.0.5-1.1%{?dist}
Release 3.0.5-1.1 Start 11/09/2023 End 17/10/2023
Expand Down
3 changes: 2 additions & 1 deletion indimail-mta-x/indimail-mta.spec.in
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#
#
# $Id: indimail-mta.spec.in,v 1.390 2023-10-16 18:39:07+05:30 Cprogrammer Exp mbhangui $
# $Id: indimail-mta.spec.in,v 1.391 2023-10-28 11:50:41+05:30 Cprogrammer Exp mbhangui $
%undefine _missing_build_ids_terminate_build
%global _unpackaged_files_terminate_build 1

Expand Down Expand Up @@ -524,6 +524,7 @@ echo ../resolv.conf 1>&3
%attr(444,root,root) %config(noreplace) %{qsysconfdir}/cronlist.q
%attr(644,root,qmail) %config(noreplace) %{qsysconfdir}/leapsecs.dat
%attr(644,root,qmail) %config(noreplace) %{qsysconfdir}/leapsecs.txt
%attr(644,root,qmail) %config(noreplace) %{qsysconfdir}/backup.conf
%attr(644,root,qmail) %config(noreplace,missingok) %{qsysconfdir}/control/nodnscheck
%attr(644,root,qmail) %config(noreplace,missingok) %{qsysconfdir}/control/level2-tlds
%attr(644,root,qmail) %config(noreplace,missingok) %{qsysconfdir}/control/level3-tlds
Expand Down
11 changes: 6 additions & 5 deletions indimail-mta-x/svctool.in
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# $Id: svctool.in,v 2.710 2023-10-24 20:05:47+05:30 Cprogrammer Exp mbhangui $
# $Id: svctool.in,v 2.711 2023-10-28 20:58:30+05:30 Cprogrammer Exp mbhangui $
#

#
Expand Down Expand Up @@ -27,7 +27,7 @@ host=@HOST@
shared_objects=0
use_dlmopen=0
skip_sendmail_check=0
RCSID="# \$Id: svctool.in,v 2.710 2023-10-24 20:05:47+05:30 Cprogrammer Exp mbhangui $"
RCSID="# \$Id: svctool.in,v 2.711 2023-10-28 20:58:30+05:30 Cprogrammer Exp mbhangui $"

#
# End of User Configuration
Expand Down Expand Up @@ -2091,7 +2091,6 @@ if [ -n "$verbose" ] ; then
echo "procmailrc"
echo "libindimail"
echo "libmysql"
echo "backup.conf"
fi
if [ ! -f $t/servicedir.conf ] ; then
[ -n "$verbose" ] && echo "servicedir.conf"
Expand Down Expand Up @@ -2367,7 +2366,8 @@ if [ ! -f $sysconfdir/backup.conf ] ; then
(
for i in $servicedir /etc/clamd.d $sysconfdir $QmailHOME/domains \
$QmailHOME/autoturn $QmailHOME/alias/.qmail-\* /etc/inittab \
/etc/init.d/svscan /etc/passwd /etc/group /etc/hosts /etc/sysconfig/network \
/etc/cron.d/cronlist.i /etc/cron.d/cronlist.q /etc/init.d/svscan \
/etc/passwd /etc/group /etc/hosts /etc/sysconfig/network \
/etc/nsswitch.conf /etc/resolv.conf /etc/security /etc/alternatives \
$QmailHOME/.bashrc $QmailHOME/.bash_profile $QmailHOME/.indimail $file
do
Expand Down Expand Up @@ -9763,7 +9763,7 @@ do
echo "$i"
fi
done
) | sort -u
) | grep -v '^#' | sort -u
}

tls_cert_check()
Expand Down Expand Up @@ -12140,6 +12140,7 @@ case $option in
fi
EXT=`date +'%d%m%y-%H%M%S'`
dump_config "$servicedir" "$cntrldir" > /root/indimail_config.txt
# take backup of config files
tar cf - `sort_backup $servicedir` | gzip -c > $backupdir/indimail-backup.$EXT.tar.gz
/bin/rm -f /root/indimail_config.txt
if [ -x $mysqlPrefix/bin/mariadb-dump ] ; then
Expand Down

0 comments on commit d658d49

Please sign in to comment.