[howto] call dietpi-sync 1 without user interaction

Did you see this when it was actually called by cron, or when you manually executed the script for testing reasons? cron runs commands without any STDIN attached (by default), in which case G_INTERACTIVE=0 is redundant. But when you execute the same script from console, there is (obviously) some STDIN, in which case dialogs are shown.