38 lines
599 B
Bash
38 lines
599 B
Bash
#!/bin/sh
|
|
#
|
|
# postinst
|
|
#
|
|
|
|
spool="/var/spool/emailrelay"
|
|
submit="/usr/sbin/emailrelay-submit"
|
|
|
|
create_spool()
|
|
{
|
|
test -d "$spool" || mkdir "$spool"
|
|
}
|
|
|
|
fix_permissions()
|
|
{
|
|
if ls -nd "$spool" | cut -d' ' --fields=3,4 | grep -q '^0 0$'
|
|
then
|
|
chgrp daemon "$spool" && chmod 775 "$spool"
|
|
fi
|
|
if ls -n "$submit" | cut -d' ' --fields=3,4 | grep -q '^0 0$'
|
|
then
|
|
chgrp daemon "$submit" && chmod g+s "$submit"
|
|
fi
|
|
}
|
|
|
|
fix_html()
|
|
{
|
|
# index.html refers to changelog.html
|
|
cd /usr/share/doc/emailrelay && gzip -d -c changelog.html.gz > changelog.html
|
|
}
|
|
|
|
#DEBHELPER#
|
|
|
|
create_spool
|
|
fix_permissions
|
|
fix_html
|
|
|