diff options
author | James An | 2015-08-08 12:44:31 -0400 |
---|---|---|
committer | James An | 2015-08-08 12:45:06 -0400 |
commit | 36fb191227e41d766d735c06a360ec886efa6d4b (patch) | |
tree | acde7514d57a1fcdcb4e393b3e86318d191669c6 /aegir.install | |
parent | 25308412674311161996c11361370db1fbc85670 (diff) | |
download | aur-36fb191227e41d766d735c06a360ec886efa6d4b.tar.gz |
Changed the aegir root to be inside the /usr/share/webapps folder, changed the Aegir user to share UID with the HTTP user, and set up Aegir setup process to only require a couple of shell commands.
Diffstat (limited to 'aegir.install')
-rw-r--r-- | aegir.install | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/aegir.install b/aegir.install index 71ffeb978c0e..9b238f9890e0 100644 --- a/aegir.install +++ b/aegir.install @@ -4,6 +4,10 @@ post_install() { echo "User already exists; no action taken." } || { useradd --gid $(id --group http) --home-dir /usr/share/webapps/aegir --non-unique --uid $(id --user http) aegir + # Replace /etc/passwd with itself having the Aegir user rearranged above the HTTP user. + tempfile=$(mktemp) + cat <(sed -n '1,/^http/p' /etc/passwd | head -n-1) <(getent passwd aegir) <(sed -n '/^http/,$p' /etc/passwd | head -n-1) >| $tempfile + install -m644 $tempfile /etc/passwd echo "Done." } @@ -56,4 +60,6 @@ post_upgrade() { pre_remove() { [ $(systemctl --system is-enabled aegir.target) = enabled ] && systemctl --system disable --now aegir.target [ $(systemctl --system is-active aegir.target) = enabled ] && systemctl --system stop --now aegir.target + [ $(getent passwd aegir &>/dev/null; echo $?) -eq 0 ] && userdel aegir + echo ">>> There are still files related to Aegir at: /usr/share/webapps/aegir." } |