aboutsummaryrefslogtreecommitdiff
path: root/share/hydractl/backup-copy-sites
blob: 19b41d171e4b6f6189501c04cde3ad7990338da9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/bin/bash
#
# Copy multiple sites.
#

# Basic parameters.
SERVER="$1"

# Syntax check.
if [ -z "$SITE" ]; then
  hydra_action_usage
  exit 1
fi

# Determine sites to copy.
if [ -z "$2" ]; then
  sites="`ls /var/sites`"
else
  shift
  sites="$*"
fi

# Copy each site.
for site in $sites; do
  hydractl backup-copy-site $SERVER $site
done