Quantcast
Channel: Bash – Jackie Chen's IT Workshop
Browsing latest articles
Browse All 22 View Live

Image may be NSFW.
Clik here to view.

Push public key to remote hosts in a batch

Sometimes it is easy to use the passwordless SSH authentication against the remotes hosts. I wrote a script that can push your public key to remote hosts in a batch. The script can be downloaded from here

View Article


Image may be NSFW.
Clik here to view.

Update puppet tags

This script allow you to apply the specified puppet tags to the listed hosts. It will do a dry run against the first host, if you are happy with the results then you can kick off the changes to all …...

View Article


Image may be NSFW.
Clik here to view.

Use sed to append a file to another

To append file2 to a specific line in file1, here is command: sed -i “<line>r file2″ file1 Example:

View Article

Image may be NSFW.
Clik here to view.

Apache mod_rewrite URL redirect script

I wrote a bash script to automate the Apache (mod_rewrite) URL redirection. It supports 3 types of redirection: - One to One: eg. From http://jackiechen.local/mylab To http://jackiechen.org./mylab -...

View Article

Image may be NSFW.
Clik here to view.

Show public IP in Linux command

In Linux console, run the following command to show the public IP address of the machine. curl echoip.net ; echo

View Article


Image may be NSFW.
Clik here to view.

SELinux block timedatectl changes

Just found out this morning that if SELinux is in enforcing mode, it may block the timedatectl command to run in RHEL7. Once changing SELinux to permissive, the problem is gone. Here is the error that...

View Article

Image may be NSFW.
Clik here to view.

Automate Akamai Cloudlets Edge Redirect

This is one of my side projects. It is written in Python and Bash. The step is very straight forward: Download the current production version -> Add the rules, then pushes it to the staging ->...

View Article

Image may be NSFW.
Clik here to view.

Run query via Sumologic API

SumoLogic query can also be run via API. Here is a bash example that I wrote to get the nginx access logs. By default it searches the logs in the past 10 minutes, but you can overwrite it by adding a...

View Article


Image may be NSFW.
Clik here to view.

AWS keyWatcher

We have seen multiple times that users accidentally expose their AWS access key and secret key on Internet, e.g. GitHub. This is a really dangerous thing, as whoever get that key can do whatever you...

View Article


Jira and Confluence Performance Monitoring Part Two

Continue with Jira and Confluence Performance Monitoring Part One, in this article I will explain a bit deeper how the Bot works which is most interesting part I think. First of all, you need to have a...

View Article
Browsing latest articles
Browse All 22 View Live