diff --git a/systemd/README.md b/systemd/README.md index 01d81e5f..44c1fff0 100644 --- a/systemd/README.md +++ b/systemd/README.md @@ -1,8 +1,8 @@ -# SystemD services +# Systemd services ## Installing -Install all SystemD services with: +Install all Systemd services with: cp systemd/conservancy-www-*.{service,timer} /etc/systemd/system systemctl enable conservancy-www-cleanup.service @@ -10,6 +10,7 @@ Install all SystemD services with: systemctl enable conservancy-www-update.timer systemctl start conservancy-www-update.timer systemctl enable conservancy-www-db.service + systemctl start conservancy-www-db.path ## Website updates @@ -29,6 +30,6 @@ Note that the update script does not run `migrate`. ## Fundraiser/sustainer database updates -The `conservancy-www-db.service` applies SQL updates to the website -database. These include the fundraising total and sustainers to be publicly -acknowledged. +The `conservancy-www-db.service` applies SQL updates to the website database +automatically when the file `django-supporters-list.sql` file is modified. These +include the fundraising total and sustainers to be publicly acknowledged. diff --git a/systemd/conservancy-www-db.path b/systemd/conservancy-www-db.path new file mode 100644 index 00000000..a30e0681 --- /dev/null +++ b/systemd/conservancy-www-db.path @@ -0,0 +1,9 @@ +[Unit] +Description=Update Conservancy website database +Before=apache2.service + +[Path] +PathChanged=/home/debian/django-supporters-list.sql + +[Install] +WantedBy=apache2.service