2
0
mirror of https://github.com/deajan/osync synced 2024-11-17 09:25:42 +00:00
osync/install.sh

31 lines
696 B
Bash
Raw Normal View History

2014-05-26 22:50:46 +00:00
#!/usr/bin/env bash
2015-09-08 10:37:37 +00:00
SCRIPT_BUILD=2015090801
2014-05-21 17:12:19 +00:00
## Osync daemon install script
2015-09-08 10:37:37 +00:00
## Tested on RHEL / CentOS 6 & 7 and Mint 17
2014-05-21 17:12:19 +00:00
## Please adapt this to fit your distro needs
2015-09-08 14:08:14 +00:00
if [ "$(whoami)" != "root" ]; then
2015-07-02 14:44:05 +00:00
echo "Must be run as root."
exit 1
fi
2015-09-08 14:08:14 +00:00
if [ ! -d /etc/osync ]; then
2015-09-08 10:37:37 +00:00
mkdir /etc/osync
fi
2014-05-22 16:48:40 +00:00
cp ./sync.conf /etc/osync/sync.conf.example
cp ./exclude.list.example /etc/osync
2014-05-21 17:12:19 +00:00
cp ./osync.sh /usr/local/bin
cp ./osync-batch.sh /usr/local/bin
2015-07-02 14:44:05 +00:00
cp ./ssh_filter.sh /usr/local/bin
2014-05-21 17:12:19 +00:00
cp ./osync-srv /etc/init.d
2015-07-02 14:44:05 +00:00
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
2015-07-22 15:14:52 +00:00
chmod 755 /etc/init.d/osync-srv
2015-07-02 14:44:05 +00:00
2014-05-21 17:12:19 +00:00