Missing sudo is critical
This commit is contained in:
parent
0aaf988c48
commit
18a4dc4fe9
|
@ -4,7 +4,7 @@ PROGRAM="osync" # Rsync based two way sync engine with fault tolerance
|
||||||
AUTHOR="(C) 2013-2017 by Orsiris de Jong"
|
AUTHOR="(C) 2013-2017 by Orsiris de Jong"
|
||||||
CONTACT="http://www.netpower.fr/osync - ozy@netpower.fr"
|
CONTACT="http://www.netpower.fr/osync - ozy@netpower.fr"
|
||||||
PROGRAM_VERSION=1.2-RC1+dev
|
PROGRAM_VERSION=1.2-RC1+dev
|
||||||
PROGRAM_BUILD=2017020701
|
PROGRAM_BUILD=2017020702
|
||||||
IS_STABLE=no
|
IS_STABLE=no
|
||||||
|
|
||||||
# Execution order #__WITH_PARANOIA_DEBUG
|
# Execution order #__WITH_PARANOIA_DEBUG
|
||||||
|
@ -140,6 +140,13 @@ function CheckEnvironment {
|
||||||
Logger "pgrep not present. Sync cannot start." "CRITICAL"
|
Logger "pgrep not present. Sync cannot start." "CRITICAL"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ "$SUDO_EXEC" == "yes" ]; then
|
||||||
|
if ! type sudo > /dev/null 2>&1 ; then
|
||||||
|
Logger "sudo not present. Sync cannot start." "CRITICAL"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# Only gets checked in config file mode where all values should be present
|
# Only gets checked in config file mode where all values should be present
|
||||||
|
@ -195,13 +202,6 @@ function CheckCurrentConfigAll {
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$SUDO_EXEC" == "yes" ]; then
|
|
||||||
if ! type sudo > /dev/null 2>&1; then
|
|
||||||
Logger "sudo is not available. Disabling sudo mode." "WARN"
|
|
||||||
SUDO_EXEC=no
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
|
|
||||||
###### Osync specific functions (non shared)
|
###### Osync specific functions (non shared)
|
||||||
|
|
Loading…
Reference in New Issue