Added systemd.path to update when a cfg is edited

stable
Justin Reichardt 2021-08-03 13:51:07 -05:00
parent f9d7cd6388
commit 694ca35d27
2 changed files with 15 additions and 0 deletions

View File

@ -8,12 +8,17 @@ install: dir
chmod +x /usr/local/share/removeadhosts/removeadhosts.sh
cp /usr/local/share/removeadhosts/removeadhosts.service /etc/systemd/system/
cp /usr/local/share/removeadhosts/removeadhosts.timer /etc/systemd/system/
cp /usr/local/share/removeadhosts/removeadhosts.path /etc/systemd/system/
activate: install
systemctl enable removeadhosts.timer
systemctl start removeadhosts.timer
systemctl enable removeadhosts.path
systemctl start removeadhosts.path
deactivate:
systemctl disable removeadhosts.timer
systemctl stop removeadhosts.timer
systemctl disable removeadhosts.path
systemctl stop removeadhosts.path
remove: deactivate
rm -f /etc/systemd/system/removeadhosts*
rm -fr /usr/local/share/removeadhosts/

10
src/removeadhosts.path Normal file
View File

@ -0,0 +1,10 @@
[Unit]
Description="Monitor the /etc/passwd file for changes"
[Path]
PathModified=/etc/removeadhosts/adlist.txt
PathModified=/etc/removeadhosts/adlistings.txt
Unit=removeadhosts.service
[Install]
WantedBy=multi-user.target