]> git.saurik.com Git - apple/syslog.git/blob - syslogd.tproj/after_install.sh
6fb20af8f37e85d7510dd394801fffed0a092227
[apple/syslog.git] / syslogd.tproj / after_install.sh
1 #! /bin/bash -e -x
2
3 if [[ "${PLATFORM_NAME}" =~ "simulator" ]] ; then
4 PLIST="${SRCROOT}"/syslogd.tproj/com.apple.syslogd_sim.plist
5 ASL_CONF="${SRCROOT}"/syslogd.tproj/asl.conf.ios_sim
6 elif [[ "${PLATFORM_NAME}" == "macosx" ]] ; then
7 PLIST="${SRCROOT}"/syslogd.tproj/com.apple.syslogd.plist
8 ASL_CONF="${SRCROOT}"/syslogd.tproj/asl.conf.osx
9 SYSLOG_CONF="${SRCROOT}"/syslogd.tproj/syslog.conf
10 else
11 PLIST="${SRCROOT}"/syslogd.tproj/com.apple.syslogd.plist
12 ASL_CONF="${SRCROOT}"/syslogd.tproj/asl.conf.ios
13 SYSLOG_CONF="${SRCROOT}"/syslogd.tproj/syslog.conf
14 SYSTEM_LOG_CONF="${SRCROOT}"/syslogd.tproj/com.apple.system.log
15 fi
16
17 DESTDIR="${DSTROOT}"/private/etc
18 install -d -m 0755 -o root -g wheel "${DESTDIR}"
19 install -m 0644 -o root -g wheel "${ASL_CONF}" "${DESTDIR}"/asl.conf
20 if [[ -n "${SYSLOG_CONF}" ]] ; then
21 install -m 0644 -o root -g wheel "${SYSLOG_CONF}" "${DESTDIR}"
22 fi
23
24 DESTDIR="${DSTROOT}"/System/Library/LaunchDaemons
25 install -d -m 0755 -o root -g wheel "${DESTDIR}"
26 install -m 0644 -o root -g wheel "${PLIST}" "${DESTDIR}"/com.apple.syslogd.plist
27 plutil -convert binary1 "${DESTDIR}"/com.apple.syslogd.plist
28
29 if [[ "${PLATFORM_NAME}" =~ "simulator" ]] ; then
30 exit 0
31 fi
32
33 install -d -m 0755 -o root -g wheel "$DSTROOT"/private/var/log/asl
34
35 if [[ "${PLATFORM_NAME}" != "macosx" ]]; then
36 install -d -m 0755 -o root -g wheel "$DSTROOT"/usr/share/sandbox
37 install -m 0644 -o root -g wheel "$SRCROOT"/syslogd.tproj/syslogd.sb "$DSTROOT"/usr/share/sandbox
38 fi
39
40 if ! [[ "${PLATFORM_NAME}" =~ "simulator" || "${PLATFORM_NAME}" == "macosx" ]]; then
41 DESTDIR="${DSTROOT}"/usr/local/etc/asl
42 install -d -m 0755 -o root -g wheel "${DESTDIR}"
43 install -m 0644 -o root -g wheel "${SYSTEM_LOG_CONF}" "${DESTDIR}"/com.apple.system.log
44 fi