summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames An2015-11-11 15:18:46 -0500
committerJames An2015-11-11 15:18:46 -0500
commit70e83e69e456ec360e3f421d5172d5591b3e782c (patch)
treee54b4248eb44685e588319a4c47fc17ea7780520
parent6d59b9bb774ae4f3b16a172ace3ee2c3500521b2 (diff)
downloadaur-70e83e69e456ec360e3f421d5172d5591b3e782c.tar.gz
Added post-install/upgrade statements to force a system-wide shared drush config.
-rw-r--r--aegir.install11
1 files changed, 11 insertions, 0 deletions
diff --git a/aegir.install b/aegir.install
index a34b1c49dc51..73bfb5053834 100644
--- a/aegir.install
+++ b/aegir.install
@@ -53,6 +53,17 @@ post_upgrade() {
install -m644 $tempfile /etc/passwd
echo "Done."
}
+
+ echo '>>> Setting up shared system-wide drush configuration'
+ echo ' by symlinking ~/.drush to /etc/drush for all users.'
+ for user in $(cut --fields=1,6 --delimiter=: /etc/passwd | grep :/home); do
+ user=($(echo $user | tr ':' ' '))
+ path="${user[1]}/.drush"
+ user="${user[0]}"
+ [ -h "$path" -a "$(realpath "$path")" = /etc/drush ] ||
+ sudo -Hu $user ln --backup --force --symbolic /etc/drush "$path"
+ done
+
[ -f /tmp/aegir.target-active ] && {
rm /tmp/aegir.target-active