Skip to main content
added 428 characters in body
Source Link
MiniMax
  • 4.2k
  • 1
  • 21
  • 36

Try quoting command and add semicolon in the end:

 $Conf{DumpPostUserCmd} = '/var/lib/backuppc/backuppc_notification_email.sh $xferOK $host $type $client $hostIP $share $XferMethod $sshPath $cmdType';

From thereBackupPC Documentation:

The configuration file is a perl script that is executed by BackupPC, so you should be careful to preserve the file syntax (punctuation, quotes etc) when you edit it. It is recommended that you use CVS, RCS or some other method of source control for changing config.pl.

Also, you can use here document for creating email message:

cat << _EOF_ > "$EMAILMESSAGE"
The filesystem backup for $host $STATUS 
-----------------------------------------
Type: $type
Client: $client
Host: $host
Host IP: $hostIP
Share: $share
XferMethod: $XferMethod
sshPath: $sshPath
cmdType: $cmdType
_EOF_

Try quoting command and add semicolon in the end:

 $Conf{DumpPostUserCmd} = '/var/lib/backuppc/backuppc_notification_email.sh $xferOK $host $type $client $hostIP $share $XferMethod $sshPath $cmdType';

From there:

The configuration file is a perl script that is executed by BackupPC, so you should be careful to preserve the file syntax (punctuation, quotes etc) when you edit it. It is recommended that you use CVS, RCS or some other method of source control for changing config.pl.

Try quoting command and add semicolon in the end:

 $Conf{DumpPostUserCmd} = '/var/lib/backuppc/backuppc_notification_email.sh $xferOK $host $type $client $hostIP $share $XferMethod $sshPath $cmdType';

From BackupPC Documentation:

The configuration file is a perl script that is executed by BackupPC, so you should be careful to preserve the file syntax (punctuation, quotes etc) when you edit it. It is recommended that you use CVS, RCS or some other method of source control for changing config.pl.

Also, you can use here document for creating email message:

cat << _EOF_ > "$EMAILMESSAGE"
The filesystem backup for $host $STATUS 
-----------------------------------------
Type: $type
Client: $client
Host: $host
Host IP: $hostIP
Share: $share
XferMethod: $XferMethod
sshPath: $sshPath
cmdType: $cmdType
_EOF_
Source Link
MiniMax
  • 4.2k
  • 1
  • 21
  • 36

Try quoting command and add semicolon in the end:

 $Conf{DumpPostUserCmd} = '/var/lib/backuppc/backuppc_notification_email.sh $xferOK $host $type $client $hostIP $share $XferMethod $sshPath $cmdType';

From there:

The configuration file is a perl script that is executed by BackupPC, so you should be careful to preserve the file syntax (punctuation, quotes etc) when you edit it. It is recommended that you use CVS, RCS or some other method of source control for changing config.pl.