Created
August 13, 2013 08:16
-
-
Save blkperl/6218966 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| RUBYOPT='-W0' | |
| export RUBYOPT | |
| su - postgres <<ENDOFSU | |
| psql puppetdb <<ENDOFPS | |
| delete from catalogs where hash in ( select catalog from catalog_resources where title like '%$1%' ); | |
| delete from certname_facts_metadata where certname = '$1'; | |
| delete from certname_facts where certname = '$1'; | |
| delete from certnames where name = '$1'; | |
| ENDOFPS | |
| ENDOFSU |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment