#!/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/configure_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
