Page 1 of 1

Daily error

Posted: Sat Dec 09, 2017 2:22 pm
by Mattieeec3
Hello,

I'm getting a daily mail with an error. I have tried to solve it, without any success.
This is the mail;
/etc/cron.daily/vesta_ssl:
cp: missing destination file operand after ‘/usr/local/vesta/ssl/certificate.crt’
Try 'cp --help' for more information.
cp: missing destination file operand after ‘/usr/local/vesta/ssl/certificate.key’
Try 'cp --help' for more information.
This is my vesta_ssl file:

Code: Select all

	#!/bin/bash

	cert_dst="/usr/local/vesta/ssl/certificate.crt"
	key_dst="/usr/local/vesta/ssl/certificate.key"

	if ! cmp -s $cert_dst $cert_src
	then
        # Copy Certificate
        cp $cert_src $cert_dst


        # Copy Keyfile
        cp $key_src $key_dst

        # Change Permission
        chown root:mail $cert_dst
        chown root:mail $key_dst

        # Restart Services
        service vesta restart &> /dev/null
        service exim4 restart &> /dev/null
fi
Does anybody know how to solve this issue? Thanks in advance!

Re: Daily error

Posted: Sat Dec 09, 2017 5:39 pm
by vanderheyde
there is no variable $cert_src defined only $cert_dst. The same for $key_src