summarylogtreecommitdiffstats
path: root/aegir.install
diff options
context:
space:
mode:
authorJames An2015-06-10 17:54:00 -0400
committerJames An2015-06-30 07:27:49 -0400
commita06ec4956d2af89fadd45850f1f29918518f3abf (patch)
tree68749633a046bdebae251dd22d0233228638dc97 /aegir.install
parent9175e9ffd307a1e7077178fd3ee7a97ca98fb78a (diff)
downloadaur-a06ec4956d2af89fadd45850f1f29918518f3abf.tar.gz
Added support for ruby-mailcatcher as the smtp-forwarder for the aegir package and added a unique system user for the aegir package.
Diffstat (limited to 'aegir.install')
-rw-r--r--aegir.install17
1 files changed, 4 insertions, 13 deletions
diff --git a/aegir.install b/aegir.install
index 63e4e0c3d845..bcc1da516ea6 100644
--- a/aegir.install
+++ b/aegir.install
@@ -7,7 +7,7 @@ post_install() {
echo ">>> 2. Ensure the http user and group exist (i.e. uid=gid=33):"
echo " $ test \$(id --user http) -eq 33 -a \$(id --group http) -eq 33 && echo Success!"
echo ">>> 3. Ensure PHP can successfully send outgoing emails (the supplied msmtprc template works for Google accounts):"
- echo " $ php -R 'mail(\"example@example.com\", \"Test email from PHP\", \"Test email body.\");"
+ echo " $ php -r 'mail(\"example@example.com\", \"Test email from PHP\", \"Test email body.\");'"
echo ">>> 4. Setup the MySQL instance (by running mysql_secure_installation, or the following shell commands):"
echo " # systemctl start mysqld"
echo " $ mysql --user=root --execute=\""
@@ -33,16 +33,7 @@ post_install() {
}
post_upgrade() {
- TEMPFILE="$(mktemp)"
- if ! getent passwd aegir &>/dev/null; then
- useradd --non-unique --uid $(id --user http) --gid $(id --group http) --home-dir /var/lib/aegir aegir
- # Rearrange user database so aegir user name comes before http
- cat >| $TEMPFILE \
- <(sed -n '/http:/q;p' /etc/passwd) \
- <(tail -n1 /etc/passwd) \
- <(sed -n '/http:/{p;q}' /etc/passwd) \
- <(head -n-1 /etc/passwd | sed '1,/http:/d')
- cp $TEMPFILE /etc/passwd
- pwconv
- fi
+ [ getent passwd aegir &>/dev/null ] || useradd --uid 696 --gid http --home-dir /var/lib/aegir aegir
+ chmod 755 /var/lib/aegir
+ pwconv
}