Gilfoyle is not just on Silicon Valley

Reed Dunn
The Collective
2 min readApr 23, 2017

--

If you are like us you are probably a fan of HBO’s comedy series Silicon Valley you also probably had one of your servers exposed to malicious code. We’ve built a new tool to monitor our clients projects and notify us through Slack if there are any changes to the files outside of version control. Of course we couldn’t just have an ordinary Slackbot, we decided to give it a little personality so it feels like Gilfoyle is working for us.

Gilfoyle Notify

Brought to you by The Collective’s Reed Dunn

Summary:
Like Gilfoyle on Silicon Valley our Gilfoyle will keep an eye on your servers and let you know when sh** is hitting the fan.

Automated Install
1. Download this repo to your servers home(~) directory

git clone https://github.com/TheCollectiveIO/gilfoyle_notify.git

2. Add your Slack Channel, API key, Host Name, Slack Icon Variables

nano gilfoyle.sh

3. Change the following variables

FILE_PATH="/path/to/file"
SERVER_NAME="NAME OF SERVER"
SLACK_API_KEY_URL="SLACK URL KEY"
SLACK_CHANNEL="SLACK CHANNEL NAME"
SLACK_EMOIJI=":gilfoyle:"

Note: In order to add a gilfoyle icon you will need to add the custom emoiji in slack. Use this image

3. Run the Install Script

sudo sh INSTALL.sh

4. Restart your server

sudo shutdown -r now

* Alternatively you can run

nohup /usr/bin/gilfoyle.sh & to run the script in the background

5. Clean up your home directory

rm -rf /home/$USERNAME/gilfoyle_notify

We advise manually installing Gilfoyle if you have a customized server configuration or are running a different flavor of linux. Gilfoyle was built with Ubuntu 16.04. For instructions check out the README.md in the repo

Stuff used to make this:

Slack Webhook Formatting for message formatting.
Slack Webhook Integration to add webhooks to slack and create a hook key.
inotify-tools for monitoring the files.

Brought to you by The Collective

www.thecollective.io

--

--