Skip to content

Commit d3014a2

Browse files
committed
Add monitoring files for the imagecache.
1 parent 47ccec7 commit d3014a2

File tree

3 files changed

+17
-0
lines changed

3 files changed

+17
-0
lines changed
176 KB
Loading

monitor-imagecache.service

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
[Service]
2+
ExecStart=/home/docker-data/tor/monitor-imagecache.sh
3+
Restart=always
4+
RestartSec=1
5+
StandardOutput=syslog
6+
StandardError=syslog
7+
SyslogIdentifier=monitor-imagecache
8+
9+
[Install]
10+
WantedBy=multi-user.target

monitor-imagecache.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/bin/sh
2+
3+
DIR=/home/docker-data/tor/imagecache
4+
inotifywait -e CLOSE_WRITE -m -r $DIR --format %f |
5+
while read RES
6+
do ln $DIR/$RES /home/docker-data/static_sites/i/$RES; done
7+

0 commit comments

Comments
 (0)