aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/hydra/deploy2
-rwxr-xr-xshare/hydra/deploy2
-rwxr-xr-xshare/hydra/import-certs8
-rwxr-xr-xshare/hydra/import-keys12
-rwxr-xr-xshare/hydractl/backup-restore-bitcoind2
-rwxr-xr-xshare/hydractl/backup-restore-firma2
-rwxr-xr-xshare/hydractl/backup-restore-git2
-rwxr-xr-xshare/hydractl/backup-restore-hidden2
-rwxr-xr-xshare/hydractl/backup-restore-mail2
-rwxr-xr-xshare/hydractl/backup-restore-mlmmj2
-rwxr-xr-xshare/hydractl/backup-restore-munin2
-rwxr-xr-xshare/hydractl/backup-restore-schleuder2
-rwxr-xr-xshare/hydractl/backup-restore-site20
-rwxr-xr-xshare/hydractl/backup-restore-svn4
-rwxr-xr-xshare/hydractl/backup-restore-sympa2
-rwxr-xr-xshare/hydractl/backup-restore-tahoe2
-rwxr-xr-xshare/hydractl/backup-restore-yacy2
-rwxr-xr-xshare/hydractl/backup-site6
-rwxr-xr-xshare/hydractl/sync-guestfs2
-rwxr-xr-xshare/hydractl/sync-media8
-rwxr-xr-xshare/hydractl/sync-tpc2
21 files changed, 44 insertions, 44 deletions
diff --git a/lib/hydra/deploy b/lib/hydra/deploy
index 84a9fda..6990339 100644
--- a/lib/hydra/deploy
+++ b/lib/hydra/deploy
@@ -140,7 +140,7 @@ function hydra_yaml_param {
function hydra_deploy_mkdirs {
# Saner defaults
$DEPLOY_COMMAND mkdir -p /etc/puppet/keys
- $DEPLOY_COMMAND chown -R root. /etc/puppet
+ $DEPLOY_COMMAND chown -R root: /etc/puppet
$DEPLOY_COMMAND chmod -R 640 /etc/puppet
}
diff --git a/share/hydra/deploy b/share/hydra/deploy
index af3d0a2..b675577 100755
--- a/share/hydra/deploy
+++ b/share/hydra/deploy
@@ -149,7 +149,7 @@ for node in $NODES; do
tee $HYDRA_FOLDER/puppet/logs/$FQDN.`date +%Y%m%d%H%M`.log
# Fix ssl folder ownership
- $SUDO chown -R `whoami`. $HYDRA_FOLDER/puppet/ssl
+ $SUDO chown -R `whoami`: $HYDRA_FOLDER/puppet/ssl
# Import keys if needed
if ! $SUDO test -f /root/.ssh/id_rsa || \
diff --git a/share/hydra/import-certs b/share/hydra/import-certs
index 9d3cc88..e1ceda6 100755
--- a/share/hydra/import-certs
+++ b/share/hydra/import-certs
@@ -48,8 +48,8 @@ for node in $NODES; do
$HYDRA_CONNECT $hostname <<EOF
sudo mkdir -p /etc/ssl/private
sudo mkdir -p /etc/ssl/certs
- sudo chown root.ssl-cert /etc/ssl/private
- sudo chown root.ssl-cert /etc/ssl/certs
+ sudo chown root:ssl-cert /etc/ssl/private
+ sudo chown root:ssl-cert /etc/ssl/certs
sudo chmod 750 /etc/ssl/private
sudo chmod 755 /etc/ssl/certs
EOF
@@ -62,10 +62,10 @@ EOF
$HYDRA_CONNECT $hostname <<EOF
sudo touch /etc/ssl/certs/$cert
- sudo chown root.ssl-cert /etc/ssl/certs/$cert
+ sudo chown root:ssl-cert /etc/ssl/certs/$cert
sudo chmod 644 /etc/ssl/certs/$cert
sudo touch /etc/ssl/private/$priv
- sudo chown root.ssl-cert /etc/ssl/private/$priv
+ sudo chown root:ssl-cert /etc/ssl/private/$priv
sudo chmod 640 /etc/ssl/private/$priv
EOF
diff --git a/share/hydra/import-keys b/share/hydra/import-keys
index 21fe744..7339a0d 100755
--- a/share/hydra/import-keys
+++ b/share/hydra/import-keys
@@ -85,7 +85,7 @@ function hydra_import_keys_openssh {
echo "Creating folder structure at $hostname:/root/.ssh..."
$HYDRA_CONNECT $hostname <<EOF
sudo mkdir -p /root/.ssh
- sudo chown root.root /root/.ssh
+ sudo chown root:root /root/.ssh
sudo chmod 700 /root/.ssh
sudo touch /root/.ssh/id_rsa
sudo touch /root/.ssh/id_rsa.pub
@@ -107,7 +107,7 @@ EOF
echo "Creating folder structure at $hostname:/root/.ssh..."
sudo mkdir -p /root/.ssh
- sudo chown root.root /root/.ssh
+ sudo chown root:root /root/.ssh
sudo chmod 700 /root/.ssh
sudo touch /root/.ssh/id_rsa
sudo touch /root/.ssh/id_rsa.pub
@@ -133,8 +133,8 @@ function hydra_import_keys_borg {
$HYDRA_CONNECT $hostname <<EOF
sudo rm -rf /root/.borg
sudo mkdir -p /root/.config/borg/hydra
- sudo chown root.root /root/.config/borg
- sudo chown root.root /root/.config/borg/hydra
+ sudo chown root:root /root/.config/borg
+ sudo chown root:root /root/.config/borg/hydra
sudo chmod 700 /root/.config/borg
sudo chmod 700 /root/.config/borg/hydra
sudo touch /root/.config/borg/hydra/key
@@ -154,8 +154,8 @@ EOF
echo "Creating folder structure at $hostname:/root/.config/borg..."
sudo mkdir -p /root/.config/borg/hydra
- sudo chown root.root /root/.config/borg
- sudo chown root.root /root/.config/borg/hydra
+ sudo chown root:root /root/.config/borg
+ sudo chown root:root /root/.config/borg/hydra
sudo chmod 700 /root/.config/borg
sudo chmod 700 /root/.config/borg/hydra
sudo touch /root/.config/borg/hydra/key
diff --git a/share/hydractl/backup-restore-bitcoind b/share/hydractl/backup-restore-bitcoind
index 359492d..9789968 100755
--- a/share/hydractl/backup-restore-bitcoind
+++ b/share/hydractl/backup-restore-bitcoind
@@ -39,4 +39,4 @@ hydra_backup_environment_service
#cp -a $RESTOREDIR/$SERVICE_DIR $SERVICE_DIR
#
# Fix permissions.
-#chown -R $SERVICE_USER.$SERVICE_GROUP $SERVICE_DIR
+#chown -R $SERVICE_USER:$SERVICE_GROUP $SERVICE_DIR
diff --git a/share/hydractl/backup-restore-firma b/share/hydractl/backup-restore-firma
index 35b2edb..c5042a1 100755
--- a/share/hydractl/backup-restore-firma
+++ b/share/hydractl/backup-restore-firma
@@ -35,4 +35,4 @@ hydra_backup_environment_service
rsync -av --delete $RESTOREDIR/$SERVICE_DIR/ $SERVICE_DIR/
# Fix permissions.
-chown -R $SERVICE_USER.$SERVICE_GROUP $SERVICE_DIR
+chown -R $SERVICE_USER:$SERVICE_GROUP $SERVICE_DIR
diff --git a/share/hydractl/backup-restore-git b/share/hydractl/backup-restore-git
index 53f6465..a51810a 100755
--- a/share/hydractl/backup-restore-git
+++ b/share/hydractl/backup-restore-git
@@ -41,7 +41,7 @@ rm -rf $SERVICE_DIR
cp -a $RESTOREDIR/$SERVICE_DIR $SERVICE_DIR
# Fix permissions.
-chown -R $SERVICE_USER.$SERVICE_GROUP $SERVICE_DIR
+chown -R $SERVICE_USER:$SERVICE_GROUP $SERVICE_DIR
# Kick config.
su $SERVICE_USER -c "gl-setup"
diff --git a/share/hydractl/backup-restore-hidden b/share/hydractl/backup-restore-hidden
index d439b29..36fe4f6 100755
--- a/share/hydractl/backup-restore-hidden
+++ b/share/hydractl/backup-restore-hidden
@@ -53,5 +53,5 @@ for folder in `ls $RESTOREDIR/$SERVICE_DIR`; do
done
# Fix permissions.
-chown -R $SERVICE_USER.$SERVICE_GROUP $SERVICE_DIR
+chown -R $SERVICE_USER:$SERVICE_GROUP $SERVICE_DIR
diff --git a/share/hydractl/backup-restore-mail b/share/hydractl/backup-restore-mail
index 6179ad9..e09077d 100755
--- a/share/hydractl/backup-restore-mail
+++ b/share/hydractl/backup-restore-mail
@@ -50,4 +50,4 @@ mkdir -p $DATABASE_DIR
rsync -av $RESTOREDIR/$DATABASE_DIR/ $DATABASE_DIR/
# Fix permissions.
-chown -R $SERVICE_USER.$SERVICE_GROUP $SERVICE_DIR
+chown -R $SERVICE_USER:$SERVICE_GROUP $SERVICE_DIR
diff --git a/share/hydractl/backup-restore-mlmmj b/share/hydractl/backup-restore-mlmmj
index fcf1b03..7212f67 100755
--- a/share/hydractl/backup-restore-mlmmj
+++ b/share/hydractl/backup-restore-mlmmj
@@ -35,4 +35,4 @@ hydra_backup_environment_service
rsync -av --delete $RESTOREDIR/$SERVICE_DIR/ $SERVICE_DIR/
# Fix permissions.
-chown -R $SERVICE_USER.$SERVICE_GROUP $SERVICE_DIR
+chown -R $SERVICE_USER:$SERVICE_GROUP $SERVICE_DIR
diff --git a/share/hydractl/backup-restore-munin b/share/hydractl/backup-restore-munin
index 3e5fb30..7b3848c 100755
--- a/share/hydractl/backup-restore-munin
+++ b/share/hydractl/backup-restore-munin
@@ -42,4 +42,4 @@ rm -rf $SERVICE_DIR
cp -a $RESTOREDIR/$SERVICE_DIR $SERVICE_DIR
# Fix permissions.
-chown -R $SERVICE_USER.$SERVICE_GROUP $SERVICE_DIR
+chown -R $SERVICE_USER:$SERVICE_GROUP $SERVICE_DIR
diff --git a/share/hydractl/backup-restore-schleuder b/share/hydractl/backup-restore-schleuder
index b0a4541..72ec658 100755
--- a/share/hydractl/backup-restore-schleuder
+++ b/share/hydractl/backup-restore-schleuder
@@ -37,4 +37,4 @@ rsync -av --delete $RESTOREDIR/$SERVICE_DIR/ $SERVICE_DIR/
rsync -av --delete $RESTOREDIR/$CONF_DIR/ $CONF_DIR/
# Fix permissions.
-chown -R $SERVICE_USER.$SERVICE_GROUP $SERVICE_DIR
+chown -R $SERVICE_USER:$SERVICE_GROUP $SERVICE_DIR
diff --git a/share/hydractl/backup-restore-site b/share/hydractl/backup-restore-site
index bf48994..f1def1d 100755
--- a/share/hydractl/backup-restore-site
+++ b/share/hydractl/backup-restore-site
@@ -104,32 +104,32 @@ if [ "$1" == "localhost" ] || [ "$1" == "backups" ]; then
fi
# Fix permissions
-chown -R root.root $FOLDER
+chown -R root:root $FOLDER
# Trac
if [ -e "$FOLDER/trac" ]; then
# Optionally also: gvcache/ log/
- ( cd $FOLDER/trac && chown -R $TRAC_USER.$TRAC_GROUP attachments conf db auth plugins .egg-cache )
+ ( cd $FOLDER/trac && chown -R $TRAC_USER:$TRAC_GROUP attachments conf db auth plugins .egg-cache )
fi
# PmWiki
if [ -e "$FOLDER/wiki" ]; then
- ( cd $FOLDER/wiki && chown -R $SITE_USER.$SITE_GROUP wiki.d uploads )
- chown $SITE.root $FOLDER/wiki/local/config.php
+ ( cd $FOLDER/wiki && chown -R $SITE_USER:$SITE_GROUP wiki.d uploads )
+ chown $SITE:root $FOLDER/wiki/local/config.php
chmod 660 $FOLDER/wiki/local/config.php
fi
# Site
if [ -e "$FOLDER/site" ]; then
- chown -R $SITE_USER.$SITE_GROUP $FOLDER/site
+ chown -R $SITE_USER:$SITE_GROUP $FOLDER/site
fi
# Drupal
if [ -e "$FOLDER/drupal" ]; then
SERIES="$4"
- chown -R $SITE_USER.$SITE_GROUP $FOLDER/drupal/files
- chown root.$SITE_GROUP $FOLDER/drupal/settings.php
+ chown -R $SITE_USER:$SITE_GROUP $FOLDER/drupal/files
+ chown root:$SITE_GROUP $FOLDER/drupal/settings.php
chmod 640 $FOLDER/drupal/settings.php
if [ -e "/etc/apache2/sites-available/$SITE" ]; then
@@ -169,7 +169,7 @@ if [ -e "$FOLDER/ikiwiki" ]; then
site="`basename $file .setup`"
git clone file:///var/git/repositories/$SITE /var/sites/$SITE/ikiwiki_src
ikiwiki --setup $file --rebuild
- chown -R $SITE_USER.$SITE_GROUP /var/sites/$SITE/ikiwiki*
+ chown -R $SITE_USER:$SITE_GROUP /var/sites/$SITE/ikiwiki*
else
echo "Either $file or git repository not found for $SITE ikiwiki instance"
fi
@@ -178,6 +178,6 @@ fi
# Moin
if [ -e "$FOLDER/moin" ]; then
echo "Restoring moin for $SITE..."
- chown -R root.root $FOLDER/moin/
- chown -R $SITE_USER.$SITE_GROUP $FOLDER/moin/{cgi-bin,data,underlay}
+ chown -R root:root $FOLDER/moin/
+ chown -R $SITE_USER:$SITE_GROUP $FOLDER/moin/{cgi-bin,data,underlay}
fi
diff --git a/share/hydractl/backup-restore-svn b/share/hydractl/backup-restore-svn
index baf13b8..0829e69 100755
--- a/share/hydractl/backup-restore-svn
+++ b/share/hydractl/backup-restore-svn
@@ -39,5 +39,5 @@ hydractl backup-site svn
rm -rf /var/svn && cp -a $RESTOREDIR/var/svn /var/svn
# Fix permissions.
-chown root.root /var/svn
-chown -R $SERVICE_USER.$SERVICE_GROUP /var/svn/*
+chown root:root /var/svn
+chown -R $SERVICE_USER:$SERVICE_GROUP /var/svn/*
diff --git a/share/hydractl/backup-restore-sympa b/share/hydractl/backup-restore-sympa
index 917fdce..63ea82c 100755
--- a/share/hydractl/backup-restore-sympa
+++ b/share/hydractl/backup-restore-sympa
@@ -41,4 +41,4 @@ rsync -av --delete $RESTOREDIR/$SERVICE_DIR/ $SERVICE_DIR/
hydra_backup_restore_database sympa
# Fix permissions.
-chown -R $SERVICE_USER.$SERVICE_GROUP $SERVICE_DIR
+chown -R $SERVICE_USER:$SERVICE_GROUP $SERVICE_DIR
diff --git a/share/hydractl/backup-restore-tahoe b/share/hydractl/backup-restore-tahoe
index e8b78ac..a3918d4 100755
--- a/share/hydractl/backup-restore-tahoe
+++ b/share/hydractl/backup-restore-tahoe
@@ -39,4 +39,4 @@ hydra_backup_environment_service
#cp -a $RESTOREDIR/$SERVICE_DIR $SERVICE_DIR
#
# Fix permissions.
-#chown -R $SERVICE_USER.$SERVICE_GROUP $SERVICE_DIR
+#chown -R $SERVICE_USER:$SERVICE_GROUP $SERVICE_DIR
diff --git a/share/hydractl/backup-restore-yacy b/share/hydractl/backup-restore-yacy
index 7161756..8141771 100755
--- a/share/hydractl/backup-restore-yacy
+++ b/share/hydractl/backup-restore-yacy
@@ -38,4 +38,4 @@ hydra_backup_environment_service
cp -a $RESTOREDIR/$SERVICE_DIR $SERVICE_DIR
# Fix permissions.
-chown -R $SERVICE_USER.$SERVICE_GROUP $SERVICE_DIR
+chown -R $SERVICE_USER:$SERVICE_GROUP $SERVICE_DIR
diff --git a/share/hydractl/backup-site b/share/hydractl/backup-site
index e37a611..ce4a200 100755
--- a/share/hydractl/backup-site
+++ b/share/hydractl/backup-site
@@ -88,7 +88,7 @@ cd $DEST
if [ ! -e "$DEST_BASE_SITE/.htpasswd" ]; then
touch $DEST_BASE_SITE/.htpasswd
chmod 640 $DEST_BASE_SITE/.htpasswd
- chown root.$BACKUPS_GROUP $DEST_BASE_SITE/.htpasswd
+ chown root:$BACKUPS_GROUP $DEST_BASE_SITE/.htpasswd
fi
# Access setup
@@ -110,7 +110,7 @@ if [ -d "$LOCATION" ]; then
tar jcvf $PACK $LOCATION
md5sum $PACK > $PACK.md5
sha1sum $PACK > $PACK.sha1
- chown root.$BACKUPS_GROUP $PACK*
+ chown root:$BACKUPS_GROUP $PACK*
chmod 640 $PACK*
echo "Saved $DEST/$PACK"
fi
@@ -127,7 +127,7 @@ if [ -d "/var/lib/mysql/$DATABASE" ]; then
rm -f $DATABASE.sql
md5sum $DATABASE.sql.bz2 > $DATABASE.sql.bz2.md5
sha1sum $DATABASE.sql.bz2 > $DATABASE.sql.bz2.sha1
- chown root.$BACKUPS_GROUP $DATABASE.sql*
+ chown root:$BACKUPS_GROUP $DATABASE.sql*
chmod 640 $DATABASE.sql*
echo "Saved $DEST/$DATABASE.sql.bz2"
fi
diff --git a/share/hydractl/sync-guestfs b/share/hydractl/sync-guestfs
index dce2f2b..c2852e1 100755
--- a/share/hydractl/sync-guestfs
+++ b/share/hydractl/sync-guestfs
@@ -40,7 +40,7 @@ if [ ! -d "$DEST" ]; then
GROUP="$(stat -c %G $ORIG)"
# With the right permissions
- $SUDO chown $OWNER.$GROUP $DEST
+ $SUDO chown $OWNER:$GROUP $DEST
fi
# First sync the folder structure
diff --git a/share/hydractl/sync-media b/share/hydractl/sync-media
index f3cd973..bf95678 100755
--- a/share/hydractl/sync-media
+++ b/share/hydractl/sync-media
@@ -75,7 +75,7 @@ function sync_media_add_metadata {
function sync_media_playlist_perms {
if [ -d "playlists" ]; then
$sudo chmod 775 playlists
- $sudo chown -R mpd.audio playlists
+ $sudo chown -R mpd:audio playlists
find playlists -type f -exec sudo chmod 664 {} \;
find playlists -type d -exec sudo chmod 775 {} \;
fi
@@ -87,7 +87,7 @@ function sync_media_incoming_perms {
echo "Fixing $INCOMING permissions..."
$sudo find $INCOMING -type f -exec chmod 664 {} \;
$sudo find $INCOMING -type d -exec chmod 775 {} \;
- $sudo chown -R $WHOAMI.incoming $INCOMING
+ $sudo chown -R $WHOAMI:incoming $INCOMING
fi
}
@@ -187,8 +187,8 @@ mkdir -p $CACHE
#echo "Fixing $CACHE permissions..."
#$sudo find $CACHE -type f -exec chmod 644 {} \;
#$sudo find $CACHE -type d -exec chmod 755 {} \;
-$sudo chown $WHOAMI. $CACHE
-$sudo chown $WHOAMI. $CACHE/*
+$sudo chown $WHOAMI: $CACHE
+$sudo chown $WHOAMI: $CACHE/*
# Check if a specific repository was passed via the command line
if [ ! -z "$REPOSITORY" ] && [ -d "$CACHE/$REPOSITORY" ] && ! echo "$REPOSITORY" | grep -q -- '--'; then
diff --git a/share/hydractl/sync-tpc b/share/hydractl/sync-tpc
index 0c8b177..c739c5a 100755
--- a/share/hydractl/sync-tpc
+++ b/share/hydractl/sync-tpc
@@ -69,7 +69,7 @@ if [ ! -d "$MEDIA" ]; then
GROUP="$(stat -c %G /var/cache/`hostname -s`/media)"
# With the right permissions
- $SUDO chown $OWNER.$GROUP $MEDIA
+ $SUDO chown $OWNER:$GROUP $MEDIA
fi
# Guest images were previously synced using rsync