This file contains 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/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 |
This file contains 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
# 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<<" |