14 lines
439 B
Bash
Executable File
14 lines
439 B
Bash
Executable File
#!/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 |