Deploy the script to rsync and enable lsyncd.
This commit is contained in:
parent
ec4ef71a55
commit
2ad8d0938d
|
@ -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 $?
|
Loading…
Reference in New Issue