Skip to content

Instantly share code, notes, and snippets.

@Nadav-Ruskin
Nadav-Ruskin / yourapp
Created June 17, 2018 11:31 — forked from leplatrem/yourapp
gunicorn virtualenv init.d script (could be simpler with upstart)
#! /bin/bash
### BEGIN INIT INFO
# Provides: yourapp
# Required-Start: nginx
# Required-Stop:
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: The main django process
# Description: The gunicorn process that receives HTTP requests
# from nginx
@Nadav-Ruskin
Nadav-Ruskin / jenkins-git-backup.sh
Created October 30, 2017 08:01 — forked from abayer/jenkins-git-backup.sh
Example of a script for backing up Jenkins config in git.
# This script assumes you have a repository that contains a directory called jenkins_home.
# It goes to a specified backup workspace, checks the repository from github, copies only wanted files from jenkins_home,
# copies all files in the repository's root (probably scripts), commits only existing files, pushes the changes, and removes the backup directory.
# Set this script up to run automatically as follows:
# sudo crontab -e
# 29 0 * * * ">>insert the script's location, perferrably it's inside REPOSITORY_HOME<<"
set -ex
git config --global user.name ">>insert bot's user name<<"
git config --global user.email ">>insert bot's email in quotation marks<<"