From dd607f224d351d183418668bc090a53800484002 Mon Sep 17 00:00:00 2001 From: Bruno Cesar Ribas Date: Wed, 22 Aug 2018 00:35:17 -0300 Subject: Creating multiple packages for boca Until now we had only one package for boca that contains all files. This approach is not correct since we may have multiple machines for some specific part of boca, eg, database and autojudge. This commit starts this new approach by updating Makefile, d/rules, d/*conffiles d/*postinst Signed-off-by: Bruno Cesar Ribas --- debian/boca-web.postinst | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 debian/boca-web.postinst (limited to 'debian/boca-web.postinst') diff --git a/debian/boca-web.postinst b/debian/boca-web.postinst new file mode 100644 index 0000000..18ce749 --- /dev/null +++ b/debian/boca-web.postinst @@ -0,0 +1,11 @@ +#!/bin/bash + +chown -R www-data.www-data /var/www/boca +chmod -R go-rwx /var/www/boca/src/private +chmod 4555 /usr/bin/safeexec + +a2ensite default-ssl +a2enmod ssl +a2enmod socache_shmcb + +service apache2 restart || true -- cgit v1.2.3 From fec3098279220d067f72a3b386fd679c58e43899 Mon Sep 17 00:00:00 2001 From: Bruno Cesar Ribas Date: Wed, 22 Aug 2018 15:27:10 -0300 Subject: d/boca-web.postinst: Add commands to enable php-fpm Signed-off-by: Bruno Cesar Ribas --- debian/boca-web.postinst | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'debian/boca-web.postinst') diff --git a/debian/boca-web.postinst b/debian/boca-web.postinst index 18ce749..60899b7 100644 --- a/debian/boca-web.postinst +++ b/debian/boca-web.postinst @@ -7,5 +7,12 @@ chmod 4555 /usr/bin/safeexec a2ensite default-ssl a2enmod ssl a2enmod socache_shmcb +a2enmod proxy_fcgi + +# Make sure embedded apache php module is not loaded +a2dismod php7.2 || true + +#enable php fpm instead +a2enconf php7.2-fpm service apache2 restart || true -- cgit v1.2.3 From 890961b390d76d45691a518bc1ff58b650af8c16 Mon Sep 17 00:00:00 2001 From: Bruno Cesar Ribas Date: Wed, 22 Aug 2018 15:55:20 -0300 Subject: d/boca-web.postinst: Remove line regarding safeexec safeexec is now part of boca-autojudge package Signed-off-by: Bruno Cesar Ribas --- debian/boca-web.postinst | 1 - 1 file changed, 1 deletion(-) (limited to 'debian/boca-web.postinst') diff --git a/debian/boca-web.postinst b/debian/boca-web.postinst index 60899b7..49061af 100644 --- a/debian/boca-web.postinst +++ b/debian/boca-web.postinst @@ -2,7 +2,6 @@ chown -R www-data.www-data /var/www/boca chmod -R go-rwx /var/www/boca/src/private -chmod 4555 /usr/bin/safeexec a2ensite default-ssl a2enmod ssl -- cgit v1.2.3 From 70299e4fea03568965e14026e3bf810e9ed2ef08 Mon Sep 17 00:00:00 2001 From: Bruno Cesar Ribas Date: Thu, 23 Aug 2018 11:32:31 -0300 Subject: d/boca-web.posinst: Resets stored password in debconf This is a security measure to avoid DB password in multiple files Signed-off-by: Bruno Cesar Ribas --- debian/boca-web.postinst | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'debian/boca-web.postinst') diff --git a/debian/boca-web.postinst b/debian/boca-web.postinst index 49061af..52071f4 100644 --- a/debian/boca-web.postinst +++ b/debian/boca-web.postinst @@ -1,5 +1,7 @@ #!/bin/bash +. /usr/share/debconf/confmodule + chown -R www-data.www-data /var/www/boca chmod -R go-rwx /var/www/boca/src/private @@ -15,3 +17,8 @@ a2dismod php7.2 || true a2enconf php7.2-fpm service apache2 restart || true + +#remember to reset possible stored password from debconf +db_reset boca-common/dbpassword || true + +exit 0 -- cgit v1.2.3