cp failing due to identical files is still counted as a failure · Issue #825 · srvrco/getssl · GitHub
Skip to content

cp failing due to identical files is still counted as a failure #825

Open

Description

@Tsaukpaetra

Describe the bug
I did a silly and configured a destination location to be the same as its original location (i.e. DOMAIN_KEY_LOCATION="/root/.getssl/domain.com/domain.com.key")

which resulted in this as an apparently fatal error:

copying private key to /root/.getssl/domain.com/domain.com.key
cp: /root/.getssl/domain.com/domain.com.key and /root/.getssl/domain.com/domain.com.key are identical (not copied).
getssl: cannot copy /root/.getssl/domain.com/domain.com.key to /root/.getssl/domain.com/domain.com.key

Traceback

 main() line 3189 called

  cert_install() line 431 called

   copy_file_to_location() line 1108 called

    error_exit() line 1301 called traceback

To Reproduce
Set a location for the key/cert/whatever to the same location as it is already in.

Expected behavior
Probably a catch warning for cp when it emits that specific error and note that the file wasn't updated.

Operating system (please complete the following information):

  • OS: FreeBSD namp 13.1-RELEASE-p7 FreeBSD 13.1-RELEASE-p7 n245428-4dfb91682c1 TRUENAS amd64
  • Bash Version tcsh 6.21.00 (Astron) 2019-05-08 (x86_64-amd-FreeBSD) options wide,nls,dl,al,kan,sm,rh,color,filec

Additional context
Just noticed that a renewal was failing and had time to troubleshoot it properly today. I think I originally made the mistake when troubleshooting scp auto-login issues and just never actually checked if it was working to the end of the process.
Lowest priority. Just wanted to share my mirth when I realized I made a stupid happen. :)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions