diff options
author | James An | 2015-08-05 11:47:26 -0400 |
---|---|---|
committer | James An | 2015-08-05 11:47:50 -0400 |
commit | 25308412674311161996c11361370db1fbc85670 (patch) | |
tree | 08abd3e1abb03a0d1ca7730956c5b5cfd9285dbe | |
parent | 280aa586020c2b1db893223950bba9a4af9de3c3 (diff) | |
download | aur-25308412674311161996c11361370db1fbc85670.tar.gz |
Refactored package to work better out-of-the-box.
-rw-r--r-- | .SRCINFO | 24 | ||||
-rw-r--r-- | PKGBUILD | 40 | ||||
-rw-r--r-- | aegir.install | 4 | ||||
-rw-r--r-- | aegir.target | 5 | ||||
-rw-r--r-- | mysqld-aegir.service | 17 | ||||
-rw-r--r-- | nginx-aegir.service | 18 | ||||
-rw-r--r-- | nginx.conf | 6 | ||||
-rw-r--r-- | nginx.systemd.conf | 3 | ||||
-rw-r--r-- | php-fpm-aegir.service | 14 | ||||
-rw-r--r-- | php-fpm.conf | 22 | ||||
-rw-r--r-- | php-fpm.systemd.conf | 3 | ||||
-rw-r--r-- | php.ini | 13 | ||||
-rw-r--r-- | sudoers | 4 |
13 files changed, 67 insertions, 106 deletions
@@ -1,7 +1,7 @@ pkgbase = aegir pkgdesc = Configuration for a dedicated Aegir server to host Drupal sites. pkgver = 7.x_3.0 - pkgrel = 1 + pkgrel = 2 url = http://aegirproject.org install = aegir.install arch = any @@ -23,21 +23,21 @@ pkgbase = aegir source = aegir.service source = aegir.target source = msmtprc - source = mysqld-aegir.service - source = nginx-aegir.service source = nginx.conf - source = php-fpm-aegir.service + source = nginx.systemd.conf source = php-fpm.conf + source = php-fpm.systemd.conf + source = php.ini source = sudoers - md5sums = 2c74cf45b76503d2912c89da4a7bcccb - md5sums = c279899d0b987e4d53ea85d0f154a510 + md5sums = b0f2e5dca01b32c967cd823dab6b8779 + md5sums = 95bce00a6c0ac2a0b51642449554105b md5sums = d43026960060bc677549baa26a24c9ee - md5sums = 7559c51ec89b4d65a1193b3d6d6da297 - md5sums = ef858752158383dfde4c8b7f8cb7c6f0 - md5sums = 7edbcc6b449a2f09ed93f88b77f300a5 - md5sums = f9f1b1a7e551c718c154c1c745827b1e - md5sums = b1300cd3bd23a2544e2eff247cad2f80 - md5sums = cb65729f01d5d641fc85518c2175a13a + md5sums = 2a640d69beeea0c03d80b75357a040fe + md5sums = 75535f9870f06c540f513262a9b7b1ab + md5sums = 496b1fa2533d1306318115e2b02984bd + md5sums = f9ae0c781a7ccefc63329daaf81fca36 + md5sums = c67b0758fde1d0fa45344c2c4222f50b + md5sums = abef83520df5c7ee6a98884db5e741de pkgname = aegir @@ -2,7 +2,7 @@ pkgname=aegir pkgver=7.x_3.0 -pkgrel=1 +pkgrel=2 pkgdesc="Configuration for a dedicated Aegir server to host Drupal sites." arch=('any') url='http://aegirproject.org' @@ -29,22 +29,22 @@ install=$pkgname.install source=("$pkgname.service" "$pkgname.target" 'msmtprc' - 'mysqld-aegir.service' - 'nginx-aegir.service' 'nginx.conf' - 'php-fpm-aegir.service' + 'nginx.systemd.conf' 'php-fpm.conf' + 'php-fpm.systemd.conf' + 'php.ini' 'sudoers' ) md5sums=('b0f2e5dca01b32c967cd823dab6b8779' - 'c279899d0b987e4d53ea85d0f154a510' + '95bce00a6c0ac2a0b51642449554105b' 'd43026960060bc677549baa26a24c9ee' - '7559c51ec89b4d65a1193b3d6d6da297' - 'ef858752158383dfde4c8b7f8cb7c6f0' - '7edbcc6b449a2f09ed93f88b77f300a5' - 'f9f1b1a7e551c718c154c1c745827b1e' - 'b1300cd3bd23a2544e2eff247cad2f80' - 'cb65729f01d5d641fc85518c2175a13a') + '2a640d69beeea0c03d80b75357a040fe' + '75535f9870f06c540f513262a9b7b1ab' + '496b1fa2533d1306318115e2b02984bd' + 'f9ae0c781a7ccefc63329daaf81fca36' + 'c67b0758fde1d0fa45344c2c4222f50b' + 'abef83520df5c7ee6a98884db5e741de') #~ pkgver() { #~ echo \ @@ -55,19 +55,19 @@ md5sums=('b0f2e5dca01b32c967cd823dab6b8779' package() { msg2 'Adding config files' - install -dm750 "$pkgdir/etc/sudoers.d" - install -Dm440 sudoers "$pkgdir/etc/sudoers.d/$pkgname" - install -Dm644 nginx.conf "$pkgdir/etc/nginx/$pkgname.conf" - install -Dm644 php-fpm.conf "$pkgdir/etc/php/fpm.d/$pkgname.conf" + install -dm750 "$pkgdir/etc/sudoers.d" install -Dm644 msmtprc "$pkgdir/etc/msmtprc.$pkgname" - install -Dm644 <( ) "$pkgdir/var/spool/cron/$pkgname" + install -Dm644 nginx.conf "$pkgdir/etc/nginx/$pkgname.conf" + install -Dm644 php-fpm.conf "$pkgdir/etc/php/fpm.d/$pkgname.conf" + install -Dm644 php.ini "$pkgdir/etc/php/conf.d/$pkgname.ini" + install -Dm400 sudoers "$pkgdir/etc/sudoers.d/$pkgname" + install -Dm644 --owner=http --group=http <( ) "$pkgdir/var/spool/cron/$pkgname" msg2 'Adding systemd files' - for unit in {mysqld,nginx,php-fpm}-aegir.service; do - install -Dm644 "$unit" "$pkgdir/usr/lib/systemd/system/$unit" - done install -Dm644 "$pkgname.service" "$pkgdir/usr/lib/systemd/system/$pkgname.service" install -Dm644 "$pkgname.target" "$pkgdir/usr/lib/systemd/system/$pkgname.target" + install -Dm644 nginx.systemd.conf "$pkgdir/usr/lib/systemd/system/nginx.service.d/aegir.conf" + install -Dm644 php-fpm.systemd.conf "$pkgdir/usr/lib/systemd/system/php-fpm.service.d/aegir.conf" msg2 'Creating $pkgname directory structure' mkdir -p "$pkgdir/etc/drush" "$pkgdir/usr/share/webapps/$pkgname" @@ -75,7 +75,7 @@ package() { umask 077 mkdir -p "$pkgdir/usr/share/webapps/$pkgname/"{backups,clients/admin,config/{includes,self,server_master/nginx/{platform,post,pre,subdir,platform,vhost}.d}} umask 022 - mkdir -p "$pkgdir/usr/share/webapps/$pkgname/"{,config{includes,self,server_localhost,server_master/nginx}} + mkdir -p "$pkgdir/usr/share/webapps/$pkgname/"{,config/{includes,self,server_localhost,server_master/nginx}} ln -s "/usr/share/webapps/$pkgname/config/server_master/nginx.conf" "$pkgdir/usr/share/webapps/$pkgname/config/nginx.conf" ln -s "/usr/share/webapps/$pkgname/config/includes/nginx_vhost_common.conf" "$pkgdir/usr/share/webapps/$pkgname/config/includes/nginx_advanced_include.conf" diff --git a/aegir.install b/aegir.install index 7e984fd7d4e7..71ffeb978c0e 100644 --- a/aegir.install +++ b/aegir.install @@ -28,9 +28,9 @@ post_install() { echo " --root=/usr/share/webapps/hostmaster \\" echo " --aegir_db_user=aegir --aegir_db_pass=password \\" echo " --client_email=aegir@$(hostname) \\" - echo " --aegir_host=$(hostname) aegir.$(hostname)\\" + echo " --aegir_host=$(hostname) aegir.$(hostname)" echo " 5. Reconfigure Aegir's nginx configuration to use UNIX sockets instead of a network loopback port:" - echo " # sed -i 's#127.0.0.1:9000#unix:/run/php-fpm/php-fpm.sock#' /var/lib/aegir/config/includes/nginx_vhost_common.conf" + echo " # sed -i 's#127.0.0.1:9000#unix:/run/php-fpm/php-fpm.sock#' /usr/share/webapps/aegir/config/includes/nginx_vhost_common.conf" echo " 6. Start and start on boot the Aegir stack target:" echo " # systemctl enable --now aegir.target" echo " 7. Enable the hosting_queued module/hosting feature, unmask the queue daemon service unit, and restart the Aegir stack:" diff --git a/aegir.target b/aegir.target index 82fa3f594343..9b73c8a76870 100644 --- a/aegir.target +++ b/aegir.target @@ -1,7 +1,8 @@ [Unit] Description=Aegir Hosting System -Wants=mailcatcher.service mailcatcher-smtp.socket -After=mailcatcher.service mailcatcher-smtp.socket +Wants=aegir.service mailcatcher.service mailcatcher-smtp.socket network.target +Requires=mysqld.service nginx.service php-fpm.service +After=aegir.service mailcatcher.service mailcatcher-smtp.socket mysqld.service network.target nginx.service php-fpm.service [Install] WantedBy=multi-user.target diff --git a/mysqld-aegir.service b/mysqld-aegir.service deleted file mode 100644 index 6b1df7542fbc..000000000000 --- a/mysqld-aegir.service +++ /dev/null @@ -1,17 +0,0 @@ -[Unit] -Description=MariaDB database server -After=syslog.target -Conflicts=mysqld.service - -[Service] -User=mysql -Group=mysql - -ExecStart=/usr/bin/mysqld --pid-file=/run/mysqld/mysqld.pid -ExecStartPost=/usr/bin/mysqld-post - -Restart=always -PrivateTmp=true - -[Install] -RequiredBy=aegir.target diff --git a/nginx-aegir.service b/nginx-aegir.service deleted file mode 100644 index 3b757e796bee..000000000000 --- a/nginx-aegir.service +++ /dev/null @@ -1,18 +0,0 @@ -[Unit] -Description=A high performance web server and a reverse proxy server -After=network.target -Conflicts=nginx.service - -[Service] -Type=forking -PIDFile=/run/nginx.pid -PrivateDevices=yes -SyslogLevel=err - -ExecStart=/usr/bin/nginx -g 'pid /run/nginx.pid; error_log stderr;' -ExecReload=/usr/bin/kill -HUP $MAINPID -KillSignal=SIGQUIT -KillMode=mixed - -[Install] -RequiredBy=aegir.target diff --git a/nginx.conf b/nginx.conf index 99731557e5d2..a52732c215e4 100644 --- a/nginx.conf +++ b/nginx.conf @@ -1,5 +1,5 @@ -user http; -worker_processes 1; +user aegir http; +worker_processes 4; error_log stderr; pid /run/nginx.pid; @@ -16,5 +16,5 @@ http { keepalive_timeout 65; gzip on; - include /var/lib/aegir/config/nginx.conf; + include /usr/share/webapps/aegir/config/nginx.conf; } diff --git a/nginx.systemd.conf b/nginx.systemd.conf new file mode 100644 index 000000000000..0e3604838aa6 --- /dev/null +++ b/nginx.systemd.conf @@ -0,0 +1,3 @@ +[Service] +ExecStart= +ExecStart=/usr/bin/nginx -c /etc/nginx/aegir.conf diff --git a/php-fpm-aegir.service b/php-fpm-aegir.service deleted file mode 100644 index 595da01d83f7..000000000000 --- a/php-fpm-aegir.service +++ /dev/null @@ -1,14 +0,0 @@ -[Unit] -Description=The PHP FastCGI Process Manager -After=syslog.target network.target -Conflicts=php-fpm.service - -[Service] -Type=notify -PIDFile=/run/php-fpm/php-fpm.pid -PrivateTmp=true -ExecStart=/usr/bin/php-fpm --nodaemonize --pid /run/php-fpm/php-fpm.pid -ExecReload=/bin/kill -USR2 $MAINPID - -[Install] -RequiredBy=aegir.target diff --git a/php-fpm.conf b/php-fpm.conf index 8b8d0595b3b7..ea79e59f87e3 100644 --- a/php-fpm.conf +++ b/php-fpm.conf @@ -1,10 +1,14 @@ +[global] +pid = /run/php-fpm/php-fpm.pid +daemonize = no + [aegir] -user = http +user = aegir group = http ; Listening interface settings listen = 127.0.0.1:9000 -listen.owner = http +listen.owner = aegir listen.group = http listen.mode = 0660 @@ -14,17 +18,3 @@ pm.max_children = 5 pm.start_servers = 2 pm.min_spare_servers = 1 pm.max_spare_servers = 3 - -; Drupal requirements -php_value[extension] = gd.so -php_value[extension] = mysqli.so -php_value[extension] = pdo_mysql.so -php_value[mbstring.http_input] = pass -php_value[mbstring.http_output] = pass -php_value[date.timezone] = UTC -php_value[open_basedir] = - -; Recommended settings -php_value[memory_limit] = 192M -php_value[display_errors] = stderr -php_value[error_reporting] = E_ALL | E_NOTICE | E_STRICT diff --git a/php-fpm.systemd.conf b/php-fpm.systemd.conf new file mode 100644 index 000000000000..077629c67b9b --- /dev/null +++ b/php-fpm.systemd.conf @@ -0,0 +1,3 @@ +[Service] +ExecStart= +ExecStart=/usr/bin/php-fpm --fpm-config /etc/php/fpm.d/aegir.conf diff --git a/php.ini b/php.ini new file mode 100644 index 000000000000..01019758195f --- /dev/null +++ b/php.ini @@ -0,0 +1,13 @@ +extension = gd.so +extension = mysqli.so +extension = pdo_mysql.so +mbstring.http_input = pass +mbstring.http_output = pass +date.timezone = UTC +open_basedir = + +; Recommended settings +memory_limit = 192M +display_errors = stderr +error_reporting = E_ALL | E_NOTICE | E_STRICT + @@ -1,3 +1,3 @@ Defaults:aegir !requiretty -http ALL=NOPASSWD: /usr/bin/systemctl reload-or-try-restart nginx.service -http ALL=NOPASSWD: /usr/bin/nginx +aegir ALL=NOPASSWD: /usr/bin/systemctl reload-or-try-restart nginx.service +aegir ALL=NOPASSWD: /usr/bin/nginx |