| author | renatofilho |
| Tue Jan 29 18:40:32 2008 +0000 (2008-01-29) | |
| branch | trunk |
| changeset 896 | 9f80dd75cd8a |
| parent 815 | 7f290a3a34b1 |
| permissions | -rw-r--r-- |
| renatofilho@815 | 1 |
#! /bin/sh |
| renatofilho@815 | 2 |
# postinst script for gms |
| renatofilho@815 | 3 |
|
| renatofilho@815 | 4 |
set -e |
| renatofilho@815 | 5 |
|
| renatofilho@815 | 6 |
case "$1" in |
| renatofilho@815 | 7 |
configure) |
| renatofilho@815 | 8 |
if ! getent passwd gms >/dev/null; then |
| renatofilho@815 | 9 |
adduser --disabled-password --quiet --system \ |
| renatofilho@815 | 10 |
--home /var/gms-media \ |
| renatofilho@815 | 11 |
--gecos "GMS media dir" --group gms |
| renatofilho@815 | 12 |
fi |
| renatofilho@815 | 13 |
if ! getent passwd gms | grep -q /var/run/gms; then |
| renatofilho@815 | 14 |
usermod -d /var/gms-media gms |
| renatofilho@815 | 15 |
fi |
| renatofilho@815 | 16 |
update-rc.d gmsd defaults |
| renatofilho@815 | 17 |
invoke-rc.d gmsd start |
| renatofilho@815 | 18 |
;; |
| renatofilho@815 | 19 |
abort-upgrade|abort-remove|abort-deconfigure) |
| renatofilho@815 | 20 |
;; |
| renatofilho@815 | 21 |
*) |
| renatofilho@815 | 22 |
echo "postinst called with unknown argument \`$1'" >&2 |
| renatofilho@815 | 23 |
exit 1 |
| renatofilho@815 | 24 |
;; |
| renatofilho@815 | 25 |
esac |
| renatofilho@815 | 26 |
|
| renatofilho@815 | 27 |
#DEBHELPER# |
| renatofilho@815 | 28 |
|
| renatofilho@815 | 29 |
exit 0 |