Don't run the *-wrapper scripts as root.
This commit is contained in:
parent
0656dac7b6
commit
862d73b03a
2 changed files with 12 additions and 0 deletions
|
|
@ -22,6 +22,12 @@ notify() {
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Don't run as root!
|
||||||
|
(( $(id -u) == 0 )) && {
|
||||||
|
printf "%s: %s\\n" "${0##*/}" "don't run me as root - it messes up permissions!" >&2
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
# Only allow one copy of the script to run at any time.
|
# Only allow one copy of the script to run at any time.
|
||||||
# shellcheck disable=SC2154
|
# shellcheck disable=SC2154
|
||||||
if [[ "$FLOCK" != "$0" ]]; then
|
if [[ "$FLOCK" != "$0" ]]; then
|
||||||
|
|
|
||||||
|
|
@ -21,6 +21,12 @@ notify() {
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Don't run as root!
|
||||||
|
(( $(id -u) == 0 )) && {
|
||||||
|
printf "%s: %s\\n" "${0##*/}" "don't run me as root - it messes up permissions!" >&2
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
# Only allow one copy of the script to run at any time.
|
# Only allow one copy of the script to run at any time.
|
||||||
# shellcheck disable=SC2154
|
# shellcheck disable=SC2154
|
||||||
if [[ "$FLOCK" != "$0" ]]; then
|
if [[ "$FLOCK" != "$0" ]]; then
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue