summaryrefslogtreecommitdiff
path: root/net-mgmt/mrtg/files/pkg-install.in
blob: 95f8d731554318df12052988f7bae2b34b44a318 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/sh

PW="/usr/sbin/pw"
CHOWN="/usr/sbin/chown"
CHMOD="/bin/chmod"
MKDIR="/bin/mkdir -p"
NOLOGIN="/usr/sbin/nologin"

MRTG_RUNDIR=%%MRTG_RUNDIR%%

case "$2" in

POST-INSTALL)
	if [ ! -d "$MRTG_RUNDIR" ]; then
		${MKDIR} $MRTG_RUNDIR
	fi

	${CHOWN} -R %%USERS%%:%%GROUPS%% ${MRTG_RUNDIR}
	${CHMOD} 0700 ${MRTG_RUNDIR}
	;;
esac
exit 0