Package pcp: Скрипты

Post install

PCP_LOG_DIR=/var/log/pcp
PCP_PMNS_DIR=/var/lib/pcp/pmns
# restore saved configs, if any
test -s "$PCP_LOG_DIR/configs.sh" && source "$PCP_LOG_DIR/configs.sh"
rm -f $PCP_LOG_DIR/configs.sh

touch "$PCP_PMNS_DIR/.NeedRebuild"
chmod 644 "$PCP_PMNS_DIR/.NeedRebuild"
/usr/sbin/post_service pmproxy

cd $PCP_PMNS_DIR && ./Rebuild -s && rm -f .NeedRebuild
Pre install

1
2
3
getent group _pcp >/dev/null || groupadd -r _pcp
getent passwd _pcp >/dev/null || \
  useradd -c "Performance Co-Pilot" -g _pcp -d /var/lib/pcp -M -r -s /sbin/nologin _pcp