summaryrefslogblamecommitdiff
path: root/audio/daapd/pkg-deinstall
blob: a0ca6d0332b28297ab7b4ad58def21d96269ab86 (plain) (tree)


























                                                                                        
#!/bin/sh
#
# $FreeBSD$
#

PATH=/bin:/usr/bin:/usr/sbin

case $2 in

POST-DEINSTALL)
  echo '---> Starting post-deinstall script:'

  if [ -f %%PREFIX%%/etc/daapd.conf ]; then
    echo '---> You seem to have made some custom daapd configuration.'
    echo '--->   The "%%USER%%" user and "%%GROUP%%" group were therefore not deleted.'
    echo '--->   You may delete them with "pw groupdel %%GROUP%%; pw userdel %%USER%%".'

  else
    echo '---> Removing group "%%GROUP%%"'
    /usr/sbin/pw groupdel -n %%GROUP%%
    echo '---> Removing user "%%USER%%"'
    echo 'y' | /usr/sbin/pw userdel -n %%USER%%
  fi

  ;;

esac