diff --git a/debian/postinst b/debian/postinst --- a/debian/postinst +++ b/debian/postinst @@ -20,23 +20,23 @@ case "$1" in configure) - if [ ! -f /var/lib/nobody/data/mcbot.dat ]; + if [ ! -f /var/lib/mcbot/data/mcbot.dat ]; then - echo "Creating initial database in /var/lib/nobody/data"; + echo "Creating initial database in /var/lib/mcbot/data"; dbtool -a -k 1 -v 1; dbtool -d 1; fi - if [ -f /var/lib/nobody/.mcbotrc.dpkg-old ]; + if [ -f /var/lib/mcbot/.mcbotrc.dpkg-old ]; then - mv -f /var/lib/nobody/.mcbotrc.dpkg-old /var/lib/nobody/.mcbotrc; + mv -f /var/lib/mcbot/.mcbotrc.dpkg-old /var/lib/mcbot/.mcbotrc; fi - echo "Changing ownership in /var/lib/nobody" - usermod -s /bin/bash -d /var/lib/nobody nobody - chown -R nobody:nogroup /var/lib/nobody - echo "Setting permissions for /var/lib/nobody/.mcbotrc to 600" - chmod 600 /var/lib/nobody/.mcbotrc + echo "Changing ownership in /var/lib/mcbot" + useradd -c "MCBOT" -s /bin/bash -d /var/lib/mcbot mcbot + chown -R mcbot:mcbot /var/lib/mcbot + echo "Setting permissions for /var/lib/mcbot/.mcbotrc to 600" + chmod 600 /var/lib/mcbot/.mcbotrc echo "ENTER /etc/init.d/mcbot restart after editing .mcbotrc" update-rc.d mcbot defaults &>/dev/null invoke-rc.d mcbot restart