From 1068c715c170904f8efff2cb69efd452b95b3d32 Mon Sep 17 00:00:00 2001 From: Orsiris de Jong Date: Thu, 2 Jul 2015 16:44:05 +0200 Subject: [PATCH] Improved small install script --- install.sh | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 8efb63b..f1ed046 100755 --- a/install.sh +++ b/install.sh @@ -1,15 +1,28 @@ #!/usr/bin/env bash -SCRIPT_BUILD=2411201401 +SCRIPT_BUILD=2015070201 ## Osync daemon install script ## Tested on RHEL / CentOS 6 & 7 ## Please adapt this to fit your distro needs +if [ "$(whoami)" != "root" ] +then + echo "Must be run as root." + exit 1 +fi + mkdir /etc/osync 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 /usr/local/bin/osync-srv +