Perhaps you should better try a hook
Something like
#!/bin/bash
if [ "$YNH_APP_ID" == "roundcube" ] ; then
source /usr/share/yunohost/helpers
ynh_write_var_in_file --file=/var/www/roundcube/config/config.inc.php --key=$config['skin'] --value='elastic2022'
fi
The file you are editing have a checksum on the settings, and next upgrade will alert you