#!/bin/sh
# author polikuo 2024/12/11
# By default, tce.installed script will launch
# distccd daemon as "tc", allowing all private IPs
# To customize for your own need,
# adjust ~/.distcc/tc.sh for tce.install script
# to import whenever distcc.tcz is loaded
# If tc.sh is not present in that directory
# tce.installed script will use the values below
# This file serves as an example file for tc.sh

PATH=/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin
CFLAGS='-march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp -Os -pipe'
CXXFLAGS='-march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp -Os -pipe'
LDFLAGS='-Wl,-O1'
TCUSER=$(cat /etc/sysconfig/tcuser)
[ "$TCUSER" ] || TCUSER='tc'
export PATH CFLAGS CXXFLAGS LDFLAGS

# You can specify multiple IP addresses with CIDR masks
# Read the manual for more infomation
distccd --daemon --user $TCUSER \
  --allow 192.168.0.0/16 \
  --allow 172.16.0.0/12 \
  --allow 10.0.0.0/8 \
  --allow 127.0.0.0/8 \
  --verbose --log-file=/var/log/distccd.log
