Daily error
Posted: Sat Dec 09, 2017 2:22 pm
Hello,
I'm getting a daily mail with an error. I have tried to solve it, without any success.
This is the mail;
Does anybody know how to solve this issue? Thanks in advance!
I'm getting a daily mail with an error. I have tried to solve it, without any success.
This is the mail;
This is my vesta_ssl file:/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.
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