Systems that has AmbientCapabilities
support (usually kernel >= linux4.3)
[Unit]
Description=FRP Server Daemon
#!/bin/sh | |
if pwd | grep /mnt/c > /dev/null; then | |
exec git.exe "$@" | |
else | |
exec /usr/bin/git "$@" | |
fi |
#!/usr/bin/env python | |
import yaml | |
import sys | |
for manifest in yaml.load_all(sys.stdin): | |
if manifest: | |
if 'metadata' in manifest and 'namespace' not in manifest['metadata']: | |
manifest['metadata']['namespace'] = sys.argv[1] | |
print '---' |
AmbientCapabilities
support (usually kernel >= linux4.3) [Unit]
Description=FRP Server Daemon
See this issue.
Docker best practise to Control and configure Docker with systemd.
Create daemon.json
file in /etc/docker
:
{"hosts": ["tcp://0.0.0.0:2375", "unix:///var/run/docker.sock"]}
#!/bin/bash | |
TODAY=$(date +%Y%m%d) | |
TARGETS=( '/etc' '/home' '/root' '/var/www' ) | |
BACKUP_ROOT='/backups' | |
BACKUP_DIR="${BACKUP_ROOT}/${TODAY}" | |
echo "$(date +%D" "%r): Beginning backup" | |
mkdir -p $BACKUP_DIR | |
for i in ${TARGETS[@]}; do |