Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions debian/python3-patchman.postinst
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ if [ "$1" = "configure" ] ; then
patchman-manage migrate --run-syncdb --fake-initial
sqlite3 /var/lib/patchman/db/patchman.db 'PRAGMA journal_mode=WAL;'

chown -R www-data:www-data /var/lib/patchman
adduser --system --group patchman-celery
usermod -a -G www-data patchman-celery
chown root:patchman-celery /etc/patchman/celery.conf
adduser --quiet --system --group patchman
adduser --quiet www-data patchman
chown root:patchman /etc/patchman/celery.conf
chmod 640 /etc/patchman/celery.conf
chmod g+w /var/lib/patchman /var/lib/patchman/db /var/lib/patchman/db/patchman.db
chown -R patchman:patchman /var/lib/patchman

WORKER_COUNT=1
if [ -f /etc/patchman/celery.conf ]; then
Expand Down
4 changes: 2 additions & 2 deletions etc/systemd/system/patchman-celery-beat.service
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ After=network-online.target

[Service]
Type=simple
User=patchman-celery
Group=patchman-celery
User=patchman
Group=patchman
Environment="REDIS_HOST=127.0.0.1"
Environment="REDIS_PORT=6379"
EnvironmentFile=/etc/patchman/celery.conf
Expand Down
4 changes: 2 additions & 2 deletions etc/systemd/system/patchman-celery-worker.service
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ After=network-online.target

[Service]
Type=simple
User=patchman-celery
Group=patchman-celery
User=patchman
Group=patchman
Environment="REDIS_HOST=127.0.0.1"
Environment="REDIS_PORT=6379"
Environment="CELERY_POOL_TYPE=solo"
Expand Down
10 changes: 4 additions & 6 deletions scripts/rpm-post-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,13 @@ patchman-manage makemigrations
patchman-manage migrate --run-syncdb --fake-initial
sqlite3 /var/lib/patchman/db/patchman.db 'PRAGMA journal_mode=WAL;'

adduser --system --group patchman-celery
usermod -a -G apache patchman-celery
chown root:patchman-celery /etc/patchman/celery.conf
adduser --system --shell /sbin/nologin patchman
usermod -a -G patchman apache
chown root:patchman /etc/patchman/celery.conf
chmod 640 /etc/patchman/celery.conf

chown -R apache:apache /var/lib/patchman
chown -R patchman:patchman /var/lib/patchman
semanage fcontext -a -t httpd_sys_rw_content_t "/var/lib/patchman/db(/.*)?"
restorecon -Rv /var/lib/patchman/db
setsebool -P httpd_can_network_memcache 1
setsebool -P httpd_can_network_connect 1

WORKER_COUNT=1
Expand Down
Loading