3 # Send notification through the taskd socket
5 # Beware, we MAY be running in a chroot!
9 sockpath
=/etc
/taskd.socket
10 reporoot
=/@jailreporoot@
13 if [ -x /usr
/bin
/perl
]; then
17 sockpath
="$cfg_chroot$sockpath"
18 reporoot
="$cfg_reporoot"
20 # authuser needs to be set if not running in the chroot.
21 # Currently that can only be the case with https push in
22 # which case REMOTE_USER will contain the user name (possibly prefixed
23 # with "/UID="). Fallback is the mirror_user if REMOTE_USER is not set.
24 authuser
="${REMOTE_USER#/UID=}"
25 [ -n authuser
] || authuser
="$cfg_mirror_user"
27 projname
="${cwd#$reporoot/}"
29 [ -S "$sockpath" ] ||
exit 0
32 echo "ref-change $authuser ${projname%.git} $line" |
/bin
/nc.openbsd
-w 1 -U "$sockpath"