#!/bin/sh
unset http_proxy HTTP_PROXY https_proxy HTTPS_PROXY all_proxy ALL_PROXY no_proxy NO_PROXY
SPEC_DIR="$HOME/.local/share/dde-control-center-spec/plugins_v1.1"

# Default to stable mode (exclude crashing network plugin via --spec).
# To force full mode once, run: DCC_FULL=1 dde-control-center-safe --show
if [ "$DCC_FULL" = "1" ]; then
	exec /usr/bin/dde-control-center "$@"
fi

if [ -d "$SPEC_DIR" ]; then
	exec /usr/bin/dde-control-center --spec "$SPEC_DIR" "$@"
fi

exec /usr/bin/dde-control-center "$@"
