test/RUN_ONCE_AS_SUDO_FOR_TESTS.sh
author Jorg Knobloch
Thu, 30 Jul 2020 22:50:42 +0200
branchENGINE-780-take2
changeset 4910 347f8b793204
parent 3244 bf242e94441c
permissions -rwxr-xr-x
ENGINE-780, take 2: After normalizing to UTC, forget the offset.
krista@3244
     1
#!/bin/bash
krista@3244
     2
if [[ $EUID > 0 ]]
krista@3244
     3
  then echo "This script must be run with sudo."
krista@3244
     4
  exit
krista@3244
     5
fi
krista@3244
     6
krista@3244
     7
mkdir -p /run/user/$(id -u $SUDO_USER)
krista@3244
     8
chown $SUDO_USER /run/user/$(id -u $SUDO_USER)