|
|
|
|
@ -5,6 +5,7 @@
|
|
|
|
|
|
|
|
|
|
%config |
|
|
|
|
rsync_enable="$openpkg_rc_def" |
|
|
|
|
rsync_daemon="yes" |
|
|
|
|
rsync_flags="" |
|
|
|
|
rsync_bind="127.0.0.1" |
|
|
|
|
rsync_port="873" |
|
|
|
|
@ -35,6 +36,7 @@
|
|
|
|
|
%start -u @l_susr@ |
|
|
|
|
rcService rsync enable yes || exit 0 |
|
|
|
|
rcService rsync active yes && exit 0 |
|
|
|
|
rcService rsync daemon yes || exit 0 |
|
|
|
|
flags="$rsync_flags" |
|
|
|
|
echo $flags | grep -- --address >/dev/null |
|
|
|
|
if [ $? -ne 0 -a ".$rsync_bind" != . ]; then |
|
|
|
|
@ -51,16 +53,19 @@
|
|
|
|
|
%stop -u @l_susr@ |
|
|
|
|
rcService rsync enable yes || exit 0 |
|
|
|
|
rcService rsync active no && exit 0 |
|
|
|
|
rcService rsync daemon yes || exit 0 |
|
|
|
|
rsync_signal TERM |
|
|
|
|
sleep 2 |
|
|
|
|
|
|
|
|
|
%restart -u @l_susr@ |
|
|
|
|
rcService rsync enable yes || exit 0 |
|
|
|
|
rcService rsync active no && exit 0 |
|
|
|
|
rcService rsync daemon yes || exit 0 |
|
|
|
|
rc rsync stop start |
|
|
|
|
|
|
|
|
|
%daily -u @l_susr@ |
|
|
|
|
rcService rsync enable yes || exit 0 |
|
|
|
|
rcService rsync daemon yes || exit 0 |
|
|
|
|
|
|
|
|
|
# rotate logfile |
|
|
|
|
shtool rotate -f \ |
|
|
|
|
|