#!/bin/sh

export XKB_DEFAULT_RULES=evdev

PATH=$PATH:$HOME/bin:/usr/local/lib/libexec/kf5:/usr/local/share/ulbsd/scripts

USER="`id -u`"
if [ "${USER}" == "0" ]
then
    AKONADI_MYSQL='/root/.local/share/akonadi/mysql.conf'
    LINE="`grep --line-number --max-count=1 --only-matching 'user=root' ${AKONADI_MYSQL} | sed -e s/\:.*//`"
    if [ "${LINE}" == "" ]
    then
        sed -i '' '/\[mysqld\]/ a \
user=root
' ${AKONADI_MYSQL}
    fi
fi
