diff options
Diffstat (limited to 'files/usr/local/libexec')
3 files changed, 13 insertions, 9 deletions
diff --git a/files/usr/local/libexec/poudriere-cron.pkg_repository b/files/usr/local/libexec/poudriere-cron.pkg_repository index f7a5c1c..dce1830 100644 --- a/files/usr/local/libexec/poudriere-cron.pkg_repository +++ b/files/usr/local/libexec/poudriere-cron.pkg_repository @@ -15,9 +15,11 @@ for patch in /usr/local/etc/poudriere.d/patches/*.patch; do done for jail in "$@"; do - poudriere jail -u -j "$jail" > /dev/null - poudriere bulk -j "$jail" -f /usr/local/etc/poudriere.d/idm-pkglist -p "$ports_tree" -z idm > /dev/null - poudriere bulk -j "$jail" -f /usr/local/etc/poudriere.d/pkglist -p "$ports_tree" > /dev/null + poudriere jail -u -j "$jail" > /dev/null + poudriere bulk -j "$jail" -f /usr/local/etc/poudriere.d/idm-pkglist -p "$ports_tree" -z idm > /dev/null + poudriere pkgclean -j "$jail" -f /usr/local/etc/poudriere.d/idm-pkglist -p "$ports_tree" -z idm -y > /dev/null + poudriere bulk -j "$jail" -f /usr/local/etc/poudriere.d/pkglist -p "$ports_tree" > /dev/null + poudriere pkgclean -j "$jail" -f /usr/local/etc/poudriere.d/pkglist -p "$ports_tree" -y > /dev/null done poudriere distclean -p "$ports_tree" -a -y > /dev/null diff --git a/files/usr/local/libexec/prosody-acme-proxy.xmpp_server b/files/usr/local/libexec/prosody-acme-proxy.xmpp_server index d69017b..70faddd 100644 --- a/files/usr/local/libexec/prosody-acme-proxy.xmpp_server +++ b/files/usr/local/libexec/prosody-acme-proxy.xmpp_server @@ -37,7 +37,7 @@ md5_old=$(cat "$CHECKSUM_FILE") printf 'get certs/%s.crt\n' "$@" printf 'get certs/%s.key\n' "$@" printf 'quit\n' -} | sftp -b - "$acmeproxy_target" +} | /usr/local/bin/sftp -b - "$acmeproxy_target" # Get md5 of the new certificates. md5_new=$(md5sum "$CERT_DIR"/*.crt "$CERT_DIR"/*.key | tee "$CHECKSUM_FILE") diff --git a/files/usr/local/libexec/prosody-update-roster.xmpp_server b/files/usr/local/libexec/prosody-update-roster.xmpp_server index 1b79747..84c0c6e 100644 --- a/files/usr/local/libexec/prosody-update-roster.xmpp_server +++ b/files/usr/local/libexec/prosody-update-roster.xmpp_server @@ -6,8 +6,9 @@ use warnings; use Net::LDAP; use Authen::SASL; -@ARGV == 1 or die "usage: $0 ROLE_NAME\n"; +@ARGV == 2 or die "usage: $0 ROLE_NAME ROSTER_FILE\n"; my $role = $ARGV[0]; +my $roster = $ARGV[1]; open my $fh, '<', '/usr/local/etc/openldap/ldap.conf' or quit($!); my %config; @@ -25,7 +26,7 @@ my $uri = $config{URI} // die("URI not specified\n"); my $users_basedn = $config{USERS_BASE} // die("USERS_BASE not specified\n"); my $roles_basedn = $config{ROLES_BASE} // die("ROLES_BASE not specified\n"); -my $conn = Net::LDAP->new($ldap_uris, version => '3') or die "$@"; +my $conn = Net::LDAP->new($uri, version => '3') or die "$@"; my $sasl = Authen::SASL->new($mech); my $status = $conn->bind(sasl => $sasl); $status->code and die $status->error; @@ -36,12 +37,13 @@ my $search = $conn->search( filter => "(&(memberOf=cn=$role,$roles_basedn)(mailAddress=*))", attrs => ['mailAddress', 'cn']); -print "[Internal]\n"; - +open $fh, '>', $roster or die "failed to open file for writing: $roster\n"; +print $fh "[Internal]\n"; foreach my $entry ($search->entries) { my $jid = ($entry->get_value('mailAddress'))[0]; my $cn = ($entry->get_value('cn'))[0] // $jid; - print "$jid=$cn\n"; + print $fh "$jid=$cn\n"; } +close $fh; system('prosodyctl reload'); |