Skip to content

Commit

Permalink
Merge pull request #9 from OUP/feature/launchd-improvements
Browse files Browse the repository at this point in the history
More launchd improvements
  • Loading branch information
rhyeal authored Feb 12, 2019
2 parents 5e73f80 + 89a1693 commit 6525691
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 3 deletions.
6 changes: 5 additions & 1 deletion Formula/aws-rotate-iam-keys.rb
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,12 @@ def plist; <<~EOS
<array>
<string>/bin/bash</string>
<string>-c</string>
<string>( cat ~/.aws-rotate-iam-keys 2>/dev/null || cat #{etc}/aws-rotate-iam-keys ) | while read line; do aws-rotate-iam-keys $line; done</string>
<string>if ! curl -s www.google.com > /dev/null; then sleep 60; fi; cp /dev/null /tmp/#{plist_name}.log ; ( cat ~/.aws-rotate-iam-keys 2>/dev/null || cat #{etc}/aws-rotate-iam-keys ) | while read line; do aws-rotate-iam-keys $line; done</string>
</array>
<key>StandardOutPath</key>
<string>/tmp/#{plist_name}.log</string>
<key>StandardErrorPath</key>
<string>/tmp/#{plist_name}.log</string>
<key>RunAtLoad</key>
<true/>
<key>StartCalendarInterval</key>
Expand Down
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,12 @@ aws iam list-access-keys --profile default
```

If it hasn't worked, check the MacOS system log for error entries matching
`aws-rotate-iam-keys`.
`aws-rotate-iam-keys`. If you can't find anything useful, the launchd job also
writes output to a file in the `/tmp` directory matching the job name, e.g.

```
/tmp/homebrew.mxcl.aws-rotate-iam-keys.log
```

### Other Linux

Expand Down
7 changes: 6 additions & 1 deletion README.template.md
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,12 @@ aws iam list-access-keys --profile default
```

If it hasn't worked, check the MacOS system log for error entries matching
`aws-rotate-iam-keys`.
`aws-rotate-iam-keys`. If you can't find anything useful, the launchd job also
writes output to a file in the `/tmp` directory matching the job name, e.g.

```
/tmp/homebrew.mxcl.aws-rotate-iam-keys.log
```

### Other Linux

Expand Down

0 comments on commit 6525691

Please sign in to comment.