Look at LSB init scripts for more information.
Copy to /etc/init.d
:
# replace "$YOUR_SERVICE_NAME" with your service's name
#!/bin/sh | |
echo "[post-rewrite hook: $1]" | |
# quick script to call "git submodule update" automatically if the | |
# .gitmodules file is changed | |
changedfiles=( `git diff-tree --no-commit-id --name-only HEAD@{1} HEAD` ) | |
if [[ "${changedfiles[*]}" =~ ".gitmodules" ]]; then | |
echo "initializing & updating submodule(s)" |
Look at LSB init scripts for more information.
Copy to /etc/init.d
:
# replace "$YOUR_SERVICE_NAME" with your service's name
import hashlib | |
import hmac | |
import base64 | |
def make_digest(message, key): | |
key = bytes(key, 'UTF-8') | |
message = bytes(message, 'UTF-8') | |
import hashlib | |
from functools import wraps | |
from django.core.cache import cache | |
from django.utils.encoding import force_text, force_bytes | |
def cache_memoize( | |
timeout, | |
prefix='', |