On 10/5/20 9:57 AM, Craig Barratt wrote:
> Yes, the --config-dir option to configure.pl <http://configure.pl> should 
> override the fhs default of /etc/BackupPC.
> 
> Assuming configure.pl <http://configure.pl> runs successfully,

it _appears_ to ...

no errors that i've _noticed_.

all _other_ config items seem to be correctly picked up.

backuppc functions normally.

> it modifies lib/BackupPC/Lib.pm and replaces __CONFDIR__ (and also 
> __TOPDIR__, __INSTALLDIR__ etc) with whatever was configured.  So look near 
> the top of that file to see what settings ended up there.  Presumably it is 
> incorrectly set to /etc/BackupPC, so something didn't work correct.  All the 
> other BackupPC programs inherit the values from there - there are no 
> command-line options to override.

for my clean-install exec of

        perl configure.pl --batch \
        --backuppc-user wwwrun \
        --config-dir    /usr/local/etc/backuppc \
        --cgi-dir       /srv/apps/backuppc/cgi-bin \
        --data-dir      /data/backups/BackupPC \
        --hostname      backuppc.example.com \
        --html-dir      /srv/apps/backuppc/images \
        --html-dir-url  /images \
        --install-dir   /usr/local/BackupPC \
        --log-dir       /var/log/BackupPC \
        --run-dir       /run/BackupPC \
        --scgi-port     -1 \
        --config-override CgiAdminUsers=\'ad...@example.com\' \
        --config-override CgiAdminUserGroup=\'\' \
        --config-override CgiNavBarAdminAllHosts=1 \
        --config-override CgiSearchBoxEnable=0 \
        --config-override CgiUserConfigEditEnable=0 \
        --config-override EMailAdminUserName=\'postmas...@mx.example.com\' \
        --config-override EMailNotifyMinDays=0.5 \
        --config-override EMailNotifyOldBackupDays=3.0 \
        --config-override PoolV3Enabled=0 \
        --config-override RsyncBackupPCPath=\'/usr/bin/rsync_bpc\' \
        --config-override SendmailPath=\'/usr/sbin/sendmail.postfix\' \
        --config-override XferLogLevel=1 \
        --config-override XferMethod=\'rsync\'

the installed

        /usr/local/BackupPC/lib/BackupPC/Lib.pm

contains
        ...
        # Version 4.4.0, released 20 Jun 2020.
        #
        # See http://backuppc.sourceforge.net.
        #
        
#========================================================================

        package BackupPC::Lib;

        ...

        sub new
        {
                my $class = shift;
                my($topDir, $installDir, $confDir, $noUserCheck) = @_;

                #
                # Whether to use filesystem hierarchy standard for file layout.
                # If set, text config files are below /etc/BackupPC.
                #
                my $useFHS = 1;
                my $paths;

                #
                # Set defaults for $topDir and $installDir.
                #
                $topDir     = '/data/backups/BackupPC'     if ( $topDir eq "" 
);        # updated by configure.pl
                $installDir = '/usr/local/BackupPC' if ( $installDir eq "" );   
 # updated by configure.pl

                #
                # Pick some initial defaults.  For FHS the only critical
                # path is the ConfDir, since we get everything else out
                # of the main config file.
                #
                if ( $useFHS ) {
                        $paths = {
                                useFHS     => $useFHS,
                                TopDir     => $topDir,
                                InstallDir => $installDir,
                                ConfDir    => $confDir eq "" ? '/etc/BackupPC' 
: $confDir,    # updated by configure.pl
                                LogDir     => '/var/log/BackupPC',
                                RunDir     => '/var/run/BackupPC',
                        };
                } else {
                        $paths = {
                                useFHS     => $useFHS,
                                TopDir     => $topDir,
                                InstallDir => $installDir,
                                ConfDir    => $confDir eq "" ? "$topDir/conf" : 
$confDir,
                                LogDir     => "$topDir/log",
                                RunDir     => "$topDir/log",
                        };
                }
        ...





_______________________________________________
BackupPC-users mailing list
BackupPC-users@lists.sourceforge.net
List:    https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:    https://github.com/backuppc/backuppc/wiki
Project: https://backuppc.github.io/backuppc/

Reply via email to