mirror of
https://github.com/deajan/osync
synced 2024-11-17 09:25:42 +00:00
31 lines
696 B
Bash
Executable File
31 lines
696 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
SCRIPT_BUILD=2015090801
|
|
|
|
## Osync daemon install script
|
|
## Tested on RHEL / CentOS 6 & 7 and Mint 17
|
|
## Please adapt this to fit your distro needs
|
|
|
|
if [ "$(whoami)" != "root" ]; then
|
|
echo "Must be run as root."
|
|
exit 1
|
|
fi
|
|
|
|
if [ ! -d /etc/osync ]; then
|
|
mkdir /etc/osync
|
|
fi
|
|
|
|
cp ./sync.conf /etc/osync/sync.conf.example
|
|
cp ./exclude.list.example /etc/osync
|
|
cp ./osync.sh /usr/local/bin
|
|
cp ./osync-batch.sh /usr/local/bin
|
|
cp ./ssh_filter.sh /usr/local/bin
|
|
cp ./osync-srv /etc/init.d
|
|
chmod 755 /usr/local/bin/osync.sh
|
|
chmod 755 /usr/local/bin/osync-batch.sh
|
|
chmod 755 /usr/local/bin/ssh_filter.sh
|
|
chown root:root /usr/local/bin/ssh_filter.sh
|
|
chmod 755 /etc/init.d/osync-srv
|
|
|
|
|