initial upload
This commit is contained in:
11
Dockerfile
Normal file
11
Dockerfile
Normal file
@@ -0,0 +1,11 @@
|
||||
FROM crazymanjinn/zfs-utils
|
||||
|
||||
ENV zfswatcher_package="zfswatcher_0.4.6-1_amd64.deb" \
|
||||
zfswatcher_link="https://github.com/rouben/zfswatcher/releases/download/0.4.6/"
|
||||
|
||||
RUN curl -OL ${zfswatcher_link}${zfswatcher_package} && \
|
||||
dpkg -i ${zfswatcher_package} && \
|
||||
rm ${zfswatcher_package}
|
||||
|
||||
COPY zfswatcher /opt/bin/zfswatcher
|
||||
ENTRYPOINT ["/opt/bin/zfswatcher"]
|
||||
2
README.md
Normal file
2
README.md
Normal file
@@ -0,0 +1,2 @@
|
||||
# zfswatcher
|
||||
Zfswatcher container for monitoring the Zettabyte File System
|
||||
17
docker-compose.yml
Normal file
17
docker-compose.yml
Normal file
@@ -0,0 +1,17 @@
|
||||
version: '2'
|
||||
|
||||
services:
|
||||
zfswatcher:
|
||||
container_name: zfswatcher
|
||||
image: pectojin/zfswatcher:latest
|
||||
build: .
|
||||
command: /opt/bin/zfswatcher
|
||||
volumes:
|
||||
- /etc/zfswatcher:/zfswatcher_config:rw
|
||||
- /var/log/zfswatcher/zfswatcher.log:/var/log/zfswatcher/zfswatcher.log:rw
|
||||
- /dev/log:/dev/log:rw
|
||||
ports:
|
||||
- 8990:8990
|
||||
devices:
|
||||
- /dev/zfs:/dev/zfs:rw
|
||||
restart: always
|
||||
14
zfswatcher
Executable file
14
zfswatcher
Executable file
@@ -0,0 +1,14 @@
|
||||
#!/bin/bash
|
||||
persist_config_path=/zfswatcher_config/zfswatcher.conf
|
||||
temp_config_path=/etc/zfs/zfswatcher.conf
|
||||
|
||||
if [[ -s $persist_config_path ]]; then
|
||||
rm $temp_config_path
|
||||
ln -s $persist_config_path /etc/zfs/
|
||||
elif [[ ( -e $persist_config_path && ! -s $persist_config_path ) || \
|
||||
( ! -e $persist_config_path ) ]]; then
|
||||
mv $temp_config_path $persist_config_path
|
||||
ln -s $persist_config_path /etc/zfs
|
||||
fi
|
||||
|
||||
exec /usr/sbin/zfswatcher
|
||||
Reference in New Issue
Block a user