File tree Expand file tree Collapse file tree 4 files changed +12
-14
lines changed
Expand file tree Collapse file tree 4 files changed +12
-14
lines changed Original file line number Diff line number Diff line change @@ -22,12 +22,12 @@ if [ "$1" = "configure" ] ; then
2222 patchman-manage migrate --run-syncdb --fake-initial
2323 sqlite3 /var/lib/patchman/db/patchman.db ' PRAGMA journal_mode=WAL;'
2424
25- chown -R www-data:www-data /var/lib/patchman
26- adduser --system --group patchman-celery
27- usermod -a -G www-data patchman-celery
28- chown root:patchman-celery /etc/patchman/celery.conf
25+ adduser --quiet --system --group patchman
26+ adduser --quiet www-data patchman
27+ chown root:patchman /etc/patchman/celery.conf
2928 chmod 640 /etc/patchman/celery.conf
3029 chmod g+w /var/lib/patchman /var/lib/patchman/db /var/lib/patchman/db/patchman.db
30+ chown -R patchman:patchman /var/lib/patchman
3131
3232 WORKER_COUNT=1
3333 if [ -f /etc/patchman/celery.conf ]; then
Original file line number Diff line number Diff line change @@ -5,8 +5,8 @@ After=network-online.target
55
66[Service]
77Type =simple
8- User =patchman-celery
9- Group =patchman-celery
8+ User =patchman
9+ Group =patchman
1010Environment ="REDIS_HOST=127.0.0.1"
1111Environment ="REDIS_PORT=6379"
1212EnvironmentFile =/etc/patchman/celery.conf
Original file line number Diff line number Diff line change @@ -5,8 +5,8 @@ After=network-online.target
55
66[Service]
77Type =simple
8- User =patchman-celery
9- Group =patchman-celery
8+ User =patchman
9+ Group =patchman
1010Environment ="REDIS_HOST=127.0.0.1"
1111Environment ="REDIS_PORT=6379"
1212Environment ="CELERY_POOL_TYPE=solo"
Original file line number Diff line number Diff line change @@ -25,15 +25,13 @@ patchman-manage makemigrations
2525patchman-manage migrate --run-syncdb --fake-initial
2626sqlite3 /var/lib/patchman/db/patchman.db ' PRAGMA journal_mode=WAL;'
2727
28- adduser --system --group patchman-celery
29- usermod -a -G apache patchman-celery
30- chown root:patchman-celery /etc/patchman/celery.conf
28+ adduser --system --shell /sbin/nologin patchman
29+ usermod -a -G patchman apache
30+ chown root:patchman /etc/patchman/celery.conf
3131chmod 640 /etc/patchman/celery.conf
32-
33- chown -R apache:apache /var/lib/patchman
32+ chown -R patchman:patchman /var/lib/patchman
3433semanage fcontext -a -t httpd_sys_rw_content_t " /var/lib/patchman/db(/.*)?"
3534restorecon -Rv /var/lib/patchman/db
36- setsebool -P httpd_can_network_memcache 1
3735setsebool -P httpd_can_network_connect 1
3836
3937WORKER_COUNT=1
You can’t perform that action at this time.
0 commit comments