Skip to content

Commit

Permalink
Bug/authorized key backup (#2)
Browse files Browse the repository at this point in the history
* Update gitignore to ignore any build files or 3rd party dependancies that are brought in during the build process

* Fixed issue with authorized keys not backing up
  • Loading branch information
rickmills committed Oct 30, 2019
1 parent 505fcd5 commit 4a66dbe
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
*.code-workspace
.idea
.DS_Store
pkg/*
src/*
!src/cmd/*
!src/.cobra.yml
!src/serverauth.go
serverauth
2 changes: 1 addition & 1 deletion src/cmd/add.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ var addCmd = &cobra.Command{
homeDir := u.HomeDir
keysDir := homeDir + "/.ssh"
keysFile := keysDir + "/authorized_keys"
backupKeysFile := keysDir + "/.ssh/authorized_keys.bak"
backupKeysFile := keysDir + "/authorized_keys.bak"

// If the .ssh directory doesnt exist, create it and set it to be owned by the user
if _, keysDirErr := os.Stat(keysDir); os.IsNotExist(keysDirErr) {
Expand Down

0 comments on commit 4a66dbe

Please sign in to comment.