fixed chromium script
This commit is contained in:
@@ -128,18 +128,24 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# allow Chromium login with Google Account
|
# allow Chromium login with Google Account
|
||||||
if [[ -f ~/.config/chromium-flags.conf ]]; then
|
# Define the configuration file path
|
||||||
CONF=~/.config/chromium-flags.conf
|
CONF="$HOME/.config/chromium-flags.conf"
|
||||||
|
# Check if the file exists, or create it if it doesn't
|
||||||
grep -qxF -- "--oauth2-client-id=77185425430.apps.googleusercontent.com" "$CONF" ||
|
if [[ ! -f "$CONF" ]]; then
|
||||||
|
# Create the file if it doesn't exist
|
||||||
|
touch "$CONF"
|
||||||
|
echo "Created new Chromium flags file: $CONF"
|
||||||
|
fi
|
||||||
|
# Add the OAuth 2.0 Client ID if it's not already there
|
||||||
|
# -q: quiet, -x: match whole line, -F: literal string match
|
||||||
|
grep -qxF -- "--oauth2-client-id=77185425430.apps.googleusercontent.com" "$CONF" || \
|
||||||
echo "--oauth2-client-id=77185425430.apps.googleusercontent.com" >>"$CONF"
|
echo "--oauth2-client-id=77185425430.apps.googleusercontent.com" >>"$CONF"
|
||||||
|
|
||||||
grep -qxF -- "--oauth2-client-secret=OTJgUOQcT7lO7GsGZq2G4IlT" "$CONF" ||
|
# Add the OAuth 2.0 Client Secret if it's not already there
|
||||||
|
grep -qxF -- "--oauth2-client-secret=OTJgUOQcT7lO7GsGZq2G4IlT" "$CONF" || \
|
||||||
echo "--oauth2-client-secret=OTJgUOQcT7lO7GsGZq2G4IlT" >>"$CONF"
|
echo "--oauth2-client-secret=OTJgUOQcT7lO7GsGZq2G4IlT" >>"$CONF"
|
||||||
|
|
||||||
echo "Now you can login to your Google Account in Chromium."
|
say_green "Chromium flags for Google Account login have been configured."
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
# Enable basic services
|
# Enable basic services
|
||||||
#sudo systemctl enable chronyd.service
|
#sudo systemctl enable chronyd.service
|
||||||
|
|||||||
Reference in New Issue
Block a user