mirror of
https://github.com/deajan/obackup.git
synced 2025-01-12 23:23:53 +01:00
Fixed installer for FreeBSD
This commit is contained in:
parent
f931227cd2
commit
7ed0e71ab4
22
install.sh
22
install.sh
@ -3,7 +3,7 @@
|
|||||||
PROGRAM=obackup
|
PROGRAM=obackup
|
||||||
PROGRAM_BINARY=$PROGRAM".sh"
|
PROGRAM_BINARY=$PROGRAM".sh"
|
||||||
PROGRAM_BATCH=$PROGRAM"-batch.sh"
|
PROGRAM_BATCH=$PROGRAM"-batch.sh"
|
||||||
SCRIPT_BUILD=2016031502
|
SCRIPT_BUILD=2016032201
|
||||||
|
|
||||||
## osync / obackup daemon install script
|
## osync / obackup daemon install script
|
||||||
## Tested on RHEL / CentOS 6 & 7, Fedora 23, Debian 7 & 8, Mint 17 and FreeBSD 8 & 10
|
## Tested on RHEL / CentOS 6 & 7, Fedora 23, Debian 7 & 8, Mint 17 and FreeBSD 8 & 10
|
||||||
@ -13,6 +13,26 @@ CONF_DIR=/etc/$PROGRAM
|
|||||||
BIN_DIR=/usr/local/bin
|
BIN_DIR=/usr/local/bin
|
||||||
SERVICE_DIR=/etc/init.d
|
SERVICE_DIR=/etc/init.d
|
||||||
|
|
||||||
|
USER=root
|
||||||
|
|
||||||
|
local_os_var="$(uname -spio 2>&1)"
|
||||||
|
if [ $? != 0 ]; then
|
||||||
|
local_os_var="$(uname -v 2>&1)"
|
||||||
|
if [ $? != 0 ]; then
|
||||||
|
local_os_var="$(uname)"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
case $local_os_var in
|
||||||
|
*"BSD"*)
|
||||||
|
GROUP=wheel
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
GROUP=root
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
|
||||||
if [ "$(whoami)" != "root" ]; then
|
if [ "$(whoami)" != "root" ]; then
|
||||||
echo "Must be run as root."
|
echo "Must be run as root."
|
||||||
exit 1
|
exit 1
|
||||||
|
Loading…
Reference in New Issue
Block a user