#!/bin/sh ### # Place the Wesnoth init script. ### ### # Create wesnoth:user and group if thet don't exist. ### group_exists=`grep ^wesnoth etc/group` if [[ "${group_exists}" == "" ]]; then groupadd -g 229 wesnoth fi user_exists=`grep ^wesnoth etc/passwd` if [[ "${user_exists}" == "" ]]; then useradd -c "Wesnoth User" -d /dev/null -u 229 -g wesnoth wesnoth -s /bin/false fi # Update desktop database and icons cache if [ -x /usr/bin/update-desktop-database ]; then /usr/bin/update-desktop-database &> /dev/null fi if [ -x /usr/bin/gtk-update-icon-cache ]; then /usr/bin/gtk-update-icon-cache -f -q /usr/share/icons/hicolor &> /dev/null fi