32 lines
725 B
Bash
Executable File
32 lines
725 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
scriptdir=$(dirname $(realpath $0))
|
|
|
|
if [[ $EUID -eq 0 ]]; then
|
|
echo "This script should not be run as root."
|
|
exit 1
|
|
fi
|
|
|
|
if [[ $(sudo id -u) -ne 0 ]]; then
|
|
echo "Please get sudo access first."
|
|
exit 1
|
|
fi
|
|
|
|
# ============================================================
|
|
|
|
. $scriptdir/init_priv.sh $@
|
|
|
|
# ============================================================
|
|
|
|
# configure_docker_rootless() {
|
|
# [ -f ~/.config/docker/daemon.json ] && return
|
|
|
|
# read -p "要配置 Docker (Rootless mode) 吗?[N]: " response
|
|
|
|
# if [[ $response =~ ^[Yy]$ ]]; then
|
|
# cp $scriptdir/files/docker-rootless-daemon.json ~/.config/docker/daemon.json
|
|
# fi
|
|
# }
|
|
|
|
# configure_docker_rootless
|