Check for sudo
This commit is contained in:
parent
68bb79a2b6
commit
5a95b915f7
|
@ -15,6 +15,11 @@ let
|
||||||
${
|
${
|
||||||
inputs.attic.packages.${system}.attic-server
|
inputs.attic.packages.${system}.attic-server
|
||||||
}/bin/atticd --config ${config.services.atticd.configFile} --mode garbage-collector-once
|
}/bin/atticd --config ${config.services.atticd.configFile} --mode garbage-collector-once
|
||||||
|
# Fail if $SUDO_USER is empty.
|
||||||
|
if [ -z "$SUDO_USER" ]; then
|
||||||
|
printf "This script must be run with sudo.\n"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
'';
|
'';
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue