mirror of
https://github.com/deajan/obackup.git
synced 2024-11-14 03:33:41 +01:00
Added cygwin to supported OS list
This commit is contained in:
parent
234fcd9887
commit
c2675e125d
@ -8,7 +8,7 @@ PROGRAM_VERSION=2.0-pre
|
||||
PROGRAM_BUILD=2016031801
|
||||
IS_STABLE=no
|
||||
|
||||
## FUNC_BUILD=2016031401
|
||||
## FUNC_BUILD=2016032001
|
||||
## BEGIN Generic functions for osync & obackup written in 2013-2016 by Orsiris de Jong - http://www.netpower.fr - ozy@netpower.fr
|
||||
|
||||
## type -p does not work on platforms other than linux (bash). If if does not work, always assume output is not a zero exitcode
|
||||
@ -410,13 +410,17 @@ function GetLocalOS {
|
||||
*"BSD"*)
|
||||
LOCAL_OS="BSD"
|
||||
;;
|
||||
*"MINGW32"*)
|
||||
*"MINGW32"*|*"CYGWIN"*)
|
||||
LOCAL_OS="msys"
|
||||
;;
|
||||
*"Darwin"*)
|
||||
LOCAL_OS="MacOSX"
|
||||
;;
|
||||
*)
|
||||
if [ "$IGNORE_OS_TYPE" == "yes" ]; then #DOC: Undocumented option
|
||||
Logger "Running on unknown local OS." "WARN"
|
||||
return
|
||||
fi
|
||||
Logger "Running on >> $local_os_var << not supported. Please report to the author." "ERROR"
|
||||
exit 1
|
||||
;;
|
||||
@ -466,7 +470,7 @@ function GetRemoteOS {
|
||||
*"BSD"*)
|
||||
REMOTE_OS="BSD"
|
||||
;;
|
||||
*"MINGW32"*)
|
||||
*"MINGW32"*|*"CYGWIN"*)
|
||||
REMOTE_OS="msys"
|
||||
;;
|
||||
*"Darwin"*)
|
||||
@ -477,6 +481,10 @@ function GetRemoteOS {
|
||||
exit 1
|
||||
;;
|
||||
*)
|
||||
if [ "$IGNORE_OS_VER" == "yes" ]; then #DOC: Undocumented option
|
||||
Logger "Running on unknown remote OS." "WARN"
|
||||
return
|
||||
fi
|
||||
Logger "Running on remote OS failed. Please report to the author if the OS is not supported." "CRITICAL"
|
||||
Logger "Remote OS said:\n$remote_os_var" "CRITICAL"
|
||||
exit 1
|
||||
|
27
install.sh
27
install.sh
@ -3,7 +3,7 @@
|
||||
PROGRAM=obackup
|
||||
PROGRAM_BINARY=$PROGRAM".sh"
|
||||
PROGRAM_BATCH=$PROGRAM"-batch.sh"
|
||||
SCRIPT_BUILD=2016031401
|
||||
SCRIPT_BUILD=2016031502
|
||||
|
||||
## osync / obackup daemon install script
|
||||
## Tested on RHEL / CentOS 6 & 7, Fedora 23, Debian 7 & 8, Mint 17 and FreeBSD 8 & 10
|
||||
@ -42,36 +42,45 @@ if [ -f "./exlude.list.example" ]; then
|
||||
cp "./exclude.list.example" "/etc/$PROGRAM"
|
||||
fi
|
||||
|
||||
if [ -f "./snapshot.conf" ]; then
|
||||
cp "./snapshot.conf" "/etc/$PROGRAM/snapshot.conf.example"
|
||||
fi
|
||||
|
||||
cp "./$PROGRAM_BINARY" "$BIN_DIR"
|
||||
if [ $? != 0 ]; then
|
||||
echo "Cannot copy $PROGRAM_BINARY to [$BIN_DIR]."
|
||||
else
|
||||
chmod 755 "$BIN_DIR/$PROGRAM_BINARY"
|
||||
echo "Copied $PROGRAM_BINARY to [$BIN_DIR]."
|
||||
fi
|
||||
cp "./$PROGRAM_BATCH" "/usr/local/bin"
|
||||
|
||||
if [ -f "./$PROGRAM_BATCH" ]; then
|
||||
cp "./$PROGRAM_BATCH" "$BIN_DIR"
|
||||
if [ $? != 0 ]; then
|
||||
echo "Cannot copy $PROGRAM_BATCH to [$BIN_DIR]."
|
||||
else
|
||||
chmod 755 "$BIN_DIR/$PROGRAM_BATCH"
|
||||
echo "Copied $PROGRAM_BATCH to [$BIN_DIR]."
|
||||
fi
|
||||
cp "./ssh_filter.sh" "/usr/local/bin"
|
||||
fi
|
||||
|
||||
if [ -f "./ssh_filter.sh" ]; then
|
||||
cp "./ssh_filter.sh" "$BIN_DIR"
|
||||
if [ $? != 0 ]; then
|
||||
echo "Cannot copy ssh_filter.sh to [$BIN_DIR]."
|
||||
else
|
||||
chmod 755 "$BIN_DIR/ssh_filter.sh"
|
||||
chown root:root "$BIN_DIR/ssh_filter.sh"
|
||||
echo "Copied ssh_filter.sh to [$BIN_DIR]."
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -f "./osync-srv" ]; then
|
||||
cp "./osync-srv" "$SERVICE_DIR"
|
||||
if [ $? != 0 ]; then
|
||||
echo "Cannot copy osync-srv to [$SERVICE_DIR]."
|
||||
else
|
||||
chmod 755 "$SERVICE_DIR/osync-srv"
|
||||
echo "Created osync-srv service in [$SERVICE_DIR]."
|
||||
chmod 755 "/etc/init.d/osync-srv"
|
||||
fi
|
||||
fi
|
||||
|
||||
chmod 755 "/usr/local/bin/$PROGRAM_BINARY"
|
||||
chmod 755 "/usr/local/bin/$PROGRAM_BATCH"
|
||||
chmod 755 "/usr/local/bin/ssh_filter.sh"
|
||||
chown root:root "/usr/local/bin/ssh_filter.sh"
|
||||
|
14
obackup.sh
14
obackup.sh
@ -8,7 +8,7 @@ PROGRAM_VERSION=2.0-pre
|
||||
PROGRAM_BUILD=2016031801
|
||||
IS_STABLE=no
|
||||
|
||||
## FUNC_BUILD=2016031401
|
||||
## FUNC_BUILD=2016032001
|
||||
## BEGIN Generic functions for osync & obackup written in 2013-2016 by Orsiris de Jong - http://www.netpower.fr - ozy@netpower.fr
|
||||
|
||||
## type -p does not work on platforms other than linux (bash). If if does not work, always assume output is not a zero exitcode
|
||||
@ -396,13 +396,17 @@ function GetLocalOS {
|
||||
*"BSD"*)
|
||||
LOCAL_OS="BSD"
|
||||
;;
|
||||
*"MINGW32"*)
|
||||
*"MINGW32"*|*"CYGWIN"*)
|
||||
LOCAL_OS="msys"
|
||||
;;
|
||||
*"Darwin"*)
|
||||
LOCAL_OS="MacOSX"
|
||||
;;
|
||||
*)
|
||||
if [ "$IGNORE_OS_TYPE" == "yes" ]; then #DOC: Undocumented option
|
||||
Logger "Running on unknown local OS." "WARN"
|
||||
return
|
||||
fi
|
||||
Logger "Running on >> $local_os_var << not supported. Please report to the author." "ERROR"
|
||||
exit 1
|
||||
;;
|
||||
@ -451,7 +455,7 @@ function GetRemoteOS {
|
||||
*"BSD"*)
|
||||
REMOTE_OS="BSD"
|
||||
;;
|
||||
*"MINGW32"*)
|
||||
*"MINGW32"*|*"CYGWIN"*)
|
||||
REMOTE_OS="msys"
|
||||
;;
|
||||
*"Darwin"*)
|
||||
@ -462,6 +466,10 @@ function GetRemoteOS {
|
||||
exit 1
|
||||
;;
|
||||
*)
|
||||
if [ "$IGNORE_OS_VER" == "yes" ]; then #DOC: Undocumented option
|
||||
Logger "Running on unknown remote OS." "WARN"
|
||||
return
|
||||
fi
|
||||
Logger "Running on remote OS failed. Please report to the author if the OS is not supported." "CRITICAL"
|
||||
Logger "Remote OS said:\n$remote_os_var" "CRITICAL"
|
||||
exit 1
|
||||
|
Loading…
Reference in New Issue
Block a user