Deploy the script to rsync and enable lsyncd.

This commit is contained in:
Kazuhiro MUSASHI 2024-02-12 17:51:25 +09:00
parent ec4ef71a55
commit 2ad8d0938d
1 changed files with 20 additions and 0 deletions

View File

@ -0,0 +1,20 @@
#!/bin/bash
CONF=/etc/lsyncd/lsyncd.conf.lua
if [ ! -d mnt/ ]; then
mkdir -p mnt/
rsync -arv kazu634@192.168.10.200:/volume1/homes/kazu634/Drive/Shared/project/ mnt/
fi
if [ ! -e ${CONF} ]; then
sudo cp ./lsyncd.conf.lua ${CONF}
sudo chown root:root ${CONF}
sudo chmod 644 ${CONF}
sudo systemctl enable lsyncd.service
sudo systemctl restart lsyncd.service
fi
exit $?