Improved small install script

This commit is contained in:
Orsiris de Jong 2015-07-02 16:44:05 +02:00
parent 2f4ee8e7b4
commit 1068c715c1
1 changed files with 14 additions and 1 deletions

View File

@ -1,15 +1,28 @@
#!/usr/bin/env bash #!/usr/bin/env bash
SCRIPT_BUILD=2411201401 SCRIPT_BUILD=2015070201
## Osync daemon install script ## Osync daemon install script
## Tested on RHEL / CentOS 6 & 7 ## Tested on RHEL / CentOS 6 & 7
## Please adapt this to fit your distro needs ## Please adapt this to fit your distro needs
if [ "$(whoami)" != "root" ]
then
echo "Must be run as root."
exit 1
fi
mkdir /etc/osync mkdir /etc/osync
cp ./sync.conf /etc/osync/sync.conf.example cp ./sync.conf /etc/osync/sync.conf.example
cp ./exclude.list.example /etc/osync cp ./exclude.list.example /etc/osync
cp ./osync.sh /usr/local/bin cp ./osync.sh /usr/local/bin
cp ./osync-batch.sh /usr/local/bin cp ./osync-batch.sh /usr/local/bin
cp ./ssh_filter.sh /usr/local/bin
cp ./osync-srv /etc/init.d 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 /usr/local/bin/osync-srv