Skip to content

Instantly share code, notes, and snippets.

#!/bin/sh /etc/rc.common
#
# inotify-dir.sh start [dir/to/monitor]
# stop
#
_inotify() {
local dir="$1"
local d
#!/bin/sh
#
SSH=/usr/bin/ssh
SSH_CONNECT_TIMEOUT=5
for i in $(seq 1 3); do
eval "$SSH -o ConnectTimeout=$SSH_CONNECT_TIMEOUT $@"
ret=$?
if [ $ret -eq 0 -o $ret -eq 127 ]; then