Added systemd.path to update when a cfg is edited
parent
f9d7cd6388
commit
694ca35d27
5
Makefile
5
Makefile
|
|
@ -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/
|
||||
|
|
|
|||
|
|
@ -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
|
||||
Loading…
Reference in New Issue