* Added defaults file in usr/share/sysklogd (managed by usher) * Added init script * Added syslog.conf (managed by usher)
33 lines
628 B
Bash
Executable File
33 lines
628 B
Bash
Executable File
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
case $1 in
|
|
preinst)
|
|
exit 0
|
|
;;
|
|
postinst)
|
|
if [ ! -f ${TARGET}/etc/syslog.conf ]; then
|
|
install -m 644 ${TARGET}/usr/share/sysklogd/syslog.conf \
|
|
${TARGET}/etc/syslog.conf
|
|
fi
|
|
if [ ! -f ${TARGET}/etc/default/sysklogd ]; then
|
|
install -m 644 ${TARGET}/usr/share/sysklogd/sysklogd.default \
|
|
${TARGET}/etc/default/sysklogd
|
|
fi
|
|
|
|
if [[ ! ${TARGET} ]]; then
|
|
/etc/init.d/sysklogd restart
|
|
update-rc enable sysklogd
|
|
else
|
|
chroot ${TARGET} 'update-rc enable sysklogd'
|
|
fi
|
|
;;
|
|
prerm)
|
|
exit 0
|
|
;;
|
|
postrm)
|
|
exit 0
|
|
;;
|
|
esac
|