commit 5aa30e7ce7bb64fdf0f4dc1558735bda49fe11d9 Author: Christer Edwards Date: Fri Oct 22 22:32:43 2021 -0600 consolidated repository cleanup diff --git a/databases/influxdb/LICENSE b/databases/influxdb/LICENSE new file mode 100644 index 0000000..f5cdce0 --- /dev/null +++ b/databases/influxdb/LICENSE @@ -0,0 +1,29 @@ +BSD 3-Clause License + +Copyright (c) 2019, Christer Edwards +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/databases/influxdb/PKG b/databases/influxdb/PKG new file mode 100644 index 0000000..30775bb --- /dev/null +++ b/databases/influxdb/PKG @@ -0,0 +1 @@ +influxdb diff --git a/databases/influxdb/README.md b/databases/influxdb/README.md new file mode 100644 index 0000000..83ad9a5 --- /dev/null +++ b/databases/influxdb/README.md @@ -0,0 +1,15 @@ +## Status +[![pipeline status](https://gitlab.com/bastillebsd-templates/influxdb/badges/master/pipeline.svg)](https://gitlab.com/bastillebsd-templates/influxdb/commits/master) + +## influxdb +Bastille Template to bootstrap InfluxDB + +## Bootstrap +```shell +bastille bootstrap https://gitlab.com/bastillebsd-templates/influxdb +``` + +## Usage +```shell +bastille template TARGET bastillebsd-templates/influxdb +``` diff --git a/databases/influxdb/SERVICE b/databases/influxdb/SERVICE new file mode 100644 index 0000000..a1ed61e --- /dev/null +++ b/databases/influxdb/SERVICE @@ -0,0 +1 @@ +influxd restart diff --git a/databases/influxdb/SYSRC b/databases/influxdb/SYSRC new file mode 100644 index 0000000..9cf71b5 --- /dev/null +++ b/databases/influxdb/SYSRC @@ -0,0 +1 @@ +influxd_enable=YES diff --git a/databases/mariadb-server/Bastillefile b/databases/mariadb-server/Bastillefile new file mode 100644 index 0000000..73c0917 --- /dev/null +++ b/databases/mariadb-server/Bastillefile @@ -0,0 +1,3 @@ +PKG mariadb105-server +SYSRC mysql_enable=YES +SERVICE mysql-server restart diff --git a/databases/mariadb-server/LICENSE b/databases/mariadb-server/LICENSE new file mode 100644 index 0000000..0f33c9f --- /dev/null +++ b/databases/mariadb-server/LICENSE @@ -0,0 +1,29 @@ +BSD 3-Clause License + +Copyright (c) 2019-2021, Christer Edwards +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/databases/mariadb-server/README.md b/databases/mariadb-server/README.md new file mode 100644 index 0000000..76f71d5 --- /dev/null +++ b/databases/mariadb-server/README.md @@ -0,0 +1,17 @@ +## Status +[![pipeline status](https://gitlab.com/bastillebsd-templates/mariadb/badges/master/pipeline.svg)](https://gitlab.com/bastillebsd-templates/mariadb/commits/master) + +## mariadb +Bastille template to bootstrap MariaDB Server + +## Bootstrap + +```shell +bastille bootstrap https://gitlab.com/bastillebsd-templates/mariadb +``` + +## Usage + +```shell +bastille template TARGET bastillebsd-templates/mariadb +``` diff --git a/databases/memcached/LICENSE b/databases/memcached/LICENSE new file mode 100644 index 0000000..f5cdce0 --- /dev/null +++ b/databases/memcached/LICENSE @@ -0,0 +1,29 @@ +BSD 3-Clause License + +Copyright (c) 2019, Christer Edwards +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/databases/memcached/PKG b/databases/memcached/PKG new file mode 100644 index 0000000..51b7e42 --- /dev/null +++ b/databases/memcached/PKG @@ -0,0 +1 @@ +memcached diff --git a/databases/memcached/README.md b/databases/memcached/README.md new file mode 100644 index 0000000..eea0f61 --- /dev/null +++ b/databases/memcached/README.md @@ -0,0 +1,15 @@ +# Memcached +Bastille template to bootstrap Memcached + +## Status +[![pipeline status](https://gitlab.com/bastillebsd-templates/memcached/badges/master/pipeline.svg)](https://gitlab.com/bastillebsd-templates/memcached/commits/master) + +## Bootstrap +```shell +bastille bootstrap https://gitlab.com/bastillebsd-templates/memcached +``` + +## Usage +```shell +bastille template TARGET bastillebsd-templates/memcached +``` diff --git a/databases/memcached/SERVICE b/databases/memcached/SERVICE new file mode 100644 index 0000000..80bc589 --- /dev/null +++ b/databases/memcached/SERVICE @@ -0,0 +1 @@ +memcached start diff --git a/databases/memcached/SYSRC b/databases/memcached/SYSRC new file mode 100644 index 0000000..102e507 --- /dev/null +++ b/databases/memcached/SYSRC @@ -0,0 +1,2 @@ +memcached_enable=YES +memcached_flags="" diff --git a/databases/mysql-server/Bastillefile b/databases/mysql-server/Bastillefile new file mode 100644 index 0000000..dd1126e --- /dev/null +++ b/databases/mysql-server/Bastillefile @@ -0,0 +1,3 @@ +PKG mysql57-server +SYSRC mysql_enable=YES +SERVICE mysql-server restart diff --git a/databases/mysql-server/LICENSE b/databases/mysql-server/LICENSE new file mode 100644 index 0000000..0f33c9f --- /dev/null +++ b/databases/mysql-server/LICENSE @@ -0,0 +1,29 @@ +BSD 3-Clause License + +Copyright (c) 2019-2021, Christer Edwards +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/databases/mysql-server/README.md b/databases/mysql-server/README.md new file mode 100644 index 0000000..1aa7169 --- /dev/null +++ b/databases/mysql-server/README.md @@ -0,0 +1,15 @@ +## Status +[![pipeline status](https://gitlab.com/bastillebsd-templates/mysql-server/badges/master/pipeline.svg)](https://gitlab.com/bastillebsd-templates/mysql-server/commits/master) + +## mysql +Bastille template to bootstrap MySQL + +## Bootstrap +```shell +bastille bootstrap https://gitlab.com/bastillebsd-templates/mysql-server +``` + +## Usage +```shell +bastille template TARGET bastillebsd-templates/mysql-server +``` diff --git a/databases/percona/PKG b/databases/percona/PKG new file mode 100644 index 0000000..3272a3d --- /dev/null +++ b/databases/percona/PKG @@ -0,0 +1,2 @@ +percona57-server +percona57-client diff --git a/databases/percona/README.md b/databases/percona/README.md new file mode 100644 index 0000000..9cc59a3 --- /dev/null +++ b/databases/percona/README.md @@ -0,0 +1,15 @@ +## Status +[![pipeline status](https://gitlab.com/bastillebsd-templates/percona/badges/master/pipeline.svg)](https://gitlab.com/bastillebsd-templates/percona/commits/master) + +## percona +Bastille Template: percona + +Fetch and apply this template with: + +```shell +bastille bootstrap https://gitlab.com/bastillebsd-templates/percona +bastille template TARGET bastillebsd-templates/percona +``` + +## Description +This template installs a percona server and client. diff --git a/databases/percona/SERVICE b/databases/percona/SERVICE new file mode 100644 index 0000000..6d8173d --- /dev/null +++ b/databases/percona/SERVICE @@ -0,0 +1 @@ +mysql-server start diff --git a/databases/percona/SYSRC b/databases/percona/SYSRC new file mode 100644 index 0000000..b87460d --- /dev/null +++ b/databases/percona/SYSRC @@ -0,0 +1 @@ +mysql_enable=YES diff --git a/databases/redis/LICENSE b/databases/redis/LICENSE new file mode 100644 index 0000000..f5cdce0 --- /dev/null +++ b/databases/redis/LICENSE @@ -0,0 +1,29 @@ +BSD 3-Clause License + +Copyright (c) 2019, Christer Edwards +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/databases/redis/PKG b/databases/redis/PKG new file mode 100644 index 0000000..7800f0f --- /dev/null +++ b/databases/redis/PKG @@ -0,0 +1 @@ +redis diff --git a/databases/redis/README.md b/databases/redis/README.md new file mode 100644 index 0000000..e09b653 --- /dev/null +++ b/databases/redis/README.md @@ -0,0 +1,15 @@ +## Status +[![pipeline status](https://gitlab.com/bastillebsd-templates/redis/badges/master/pipeline.svg)](https://gitlab.com/bastillebsd-templates/redis/commits/master) + +## redis +Bastille template to bootstrap Redis + +## Bootstrap +```shell +bastille bootstrap https://gitlab.com/bastillebsd-templates/redis +``` + +## Usage +```shell +bastille template TARGET bastillebsd-templates/redis +``` diff --git a/databases/redis/SERVICE b/databases/redis/SERVICE new file mode 100644 index 0000000..8e551b6 --- /dev/null +++ b/databases/redis/SERVICE @@ -0,0 +1 @@ +redis start diff --git a/databases/redis/SYSRC b/databases/redis/SYSRC new file mode 100644 index 0000000..7949fe7 --- /dev/null +++ b/databases/redis/SYSRC @@ -0,0 +1 @@ +redis_enable=YES diff --git a/databases/tile38-server/Bastillefile b/databases/tile38-server/Bastillefile new file mode 100644 index 0000000..19c7b3c --- /dev/null +++ b/databases/tile38-server/Bastillefile @@ -0,0 +1,3 @@ +PKG tile38 +SYSRC tile38_enable=YES +SERVICE tile38 start diff --git a/databases/tile38-server/LICENSE b/databases/tile38-server/LICENSE new file mode 100644 index 0000000..fdef12c --- /dev/null +++ b/databases/tile38-server/LICENSE @@ -0,0 +1,29 @@ +BSD 3-Clause License + +Copyright (c) 2020-2021, Brian Downs +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/databases/tile38-server/README.md b/databases/tile38-server/README.md new file mode 100644 index 0000000..5332c07 --- /dev/null +++ b/databases/tile38-server/README.md @@ -0,0 +1,15 @@ +## Status +[![pipeline status](https://gitlab.com/bastillebsd-templates/tile38-server/badges/master/pipeline.svg)](https://gitlab.com/bastillebsd-templates/tile38-server/commits/master) + +## tile38 +Bastille template to bootstrap Tile38 + +## Bootstrap +```shell +bastille bootstrap https://gitlab.com/bastillebsd-templates/tile38-server +``` + +## Usage +```shell +bastille template TARGET bastillebsd-templates/tile38-server +``` diff --git a/devel/jenkins/LICENSE b/devel/jenkins/LICENSE new file mode 100644 index 0000000..f5cdce0 --- /dev/null +++ b/devel/jenkins/LICENSE @@ -0,0 +1,29 @@ +BSD 3-Clause License + +Copyright (c) 2019, Christer Edwards +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/devel/jenkins/PKG b/devel/jenkins/PKG new file mode 100644 index 0000000..608ccbb --- /dev/null +++ b/devel/jenkins/PKG @@ -0,0 +1 @@ +jenkins diff --git a/devel/jenkins/README.md b/devel/jenkins/README.md new file mode 100644 index 0000000..3d5a7a1 --- /dev/null +++ b/devel/jenkins/README.md @@ -0,0 +1,15 @@ +# Jenkins +Bastille template to bootstrap Jenkins + +## Status +[![pipeline status](https://gitlab.com/bastillebsd-templates/jenkins/badges/master/pipeline.svg)](https://gitlab.com/bastillebsd-templates/jenkins/commits/master) + +## Bootstrap +```shell +bastille bootstrap https://gitlab.com/bastillebsd-templates/jenkins +``` + +## Usage +```shell +bastille template TARGET bastillebsd-templates/jenkins +``` diff --git a/devel/jenkins/SERVICE b/devel/jenkins/SERVICE new file mode 100644 index 0000000..ddb168a --- /dev/null +++ b/devel/jenkins/SERVICE @@ -0,0 +1 @@ +jenkins start diff --git a/devel/jenkins/SYSRC b/devel/jenkins/SYSRC new file mode 100644 index 0000000..6b664f9 --- /dev/null +++ b/devel/jenkins/SYSRC @@ -0,0 +1 @@ +jenkins_enable=YES diff --git a/dns/dnsmasq/Bastillefile b/dns/dnsmasq/Bastillefile new file mode 100644 index 0000000..992805f --- /dev/null +++ b/dns/dnsmasq/Bastillefile @@ -0,0 +1,4 @@ +CMD mkdir -p /usr/local/netboot/tftpboot +PKG dnsmasq +SYSRC dnsmasq_enable=YES +SERVICE dnsmasq restart diff --git a/dns/dnsmasq/LICENSE b/dns/dnsmasq/LICENSE new file mode 100644 index 0000000..0f33c9f --- /dev/null +++ b/dns/dnsmasq/LICENSE @@ -0,0 +1,29 @@ +BSD 3-Clause License + +Copyright (c) 2019-2021, Christer Edwards +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/dns/dnsmasq/README.md b/dns/dnsmasq/README.md new file mode 100644 index 0000000..96cbae1 --- /dev/null +++ b/dns/dnsmasq/README.md @@ -0,0 +1,15 @@ +## Status +[![pipeline status](https://gitlab.com/bastillebsd-templates/dnsmasq/badges/master/pipeline.svg)](https://gitlab.com/bastillebsd-templates/dnsmasq/commits/master) + +## dnsmasq +Bastille template to bootstrap dnsmasq + +## Bootstrap +```shell +bastille bootstrap https://gitlab.com/bastillebsd-templates/dnsmasq +``` + +## Usage +```shell +bastille template TARGET bastillebsd-templates/dnsmasq +``` diff --git a/dns/unbound-adblock/Bastillefile b/dns/unbound-adblock/Bastillefile new file mode 100644 index 0000000..2af1530 --- /dev/null +++ b/dns/unbound-adblock/Bastillefile @@ -0,0 +1,10 @@ +PKG unbound ca_root_nss +CP usr / +SYSRC unbound_enable=YES +CMD chown unbound:wheel /usr/local/etc/unbound +CMD /usr/local/sbin/unbound-control-setup +CMD /usr/local/sbin/unbound-checkconf +SERVICE unbound restart +CMD sh /usr/local/etc/periodic/daily/999.adblock +CP etc / +CMD host omtrdc.net diff --git a/dns/unbound-adblock/LICENSE b/dns/unbound-adblock/LICENSE new file mode 100644 index 0000000..e883cb5 --- /dev/null +++ b/dns/unbound-adblock/LICENSE @@ -0,0 +1,29 @@ +BSD 3-Clause License + +Copyright (c) 2021, Christer Edwards +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/dns/unbound-adblock/README.md b/dns/unbound-adblock/README.md new file mode 100644 index 0000000..972947b --- /dev/null +++ b/dns/unbound-adblock/README.md @@ -0,0 +1,18 @@ +## Status +[![pipeline status](https://gitlab.com/bastillebsd-templates/unbound-adblock/badges/main/pipeline.svg)](https://gitlab.com/bastillebsd-templates/unbound-adblock/commits/main) + +## unbound-adblock +Bastille template to bootstrap Unbound + adblock + +## Bootstrap + +```shell +bastille bootstrap https://gitlab.com/bastillebsd-templates/unbound-adblock +``` + +## Usage + +```shell +bastille template TARGET bastillebsd-templates/unbound-adblock + +``` diff --git a/dns/unbound-adblock/etc/resolv.conf b/dns/unbound-adblock/etc/resolv.conf new file mode 100644 index 0000000..bbc8559 --- /dev/null +++ b/dns/unbound-adblock/etc/resolv.conf @@ -0,0 +1 @@ +nameserver 127.0.0.1 diff --git a/dns/unbound-adblock/usr/local/etc/periodic/daily/999.adblock b/dns/unbound-adblock/usr/local/etc/periodic/daily/999.adblock new file mode 100644 index 0000000..0b04ad2 --- /dev/null +++ b/dns/unbound-adblock/usr/local/etc/periodic/daily/999.adblock @@ -0,0 +1,36 @@ +#!/bin/sh + +BlocklistURL=${1:-"https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts"} +AdBlockPath=${2:-"/usr/local/etc/unbound/adblock.conf"} +LogFile=${3:-"/var/log/adblock-update.log"} +ExporterPath=${4-"/var/tmp/node_exporter"} + +## add timestamp to LogFile +if [ ! -f ${LogFile} ]; then + touch ${LogFile} +fi +echo $(date +%F) >> ${LogFile} + +## add linecount of adblock file to LogFile +if [ ! -f ${AdBlockPath} ]; then + touch ${AdBlockPath} +fi +wc -l ${AdBlockPath} >> ${LogFile} + +## fetch blocklist url & generate adblock.conf +fetch ${BlocklistURL} -o - | awk '/^0.0.0.0/ {print "local-zone: \""$2"\" redirect\nlocal-data: \""$2" A '0.0.0.0'\""}' > ${AdBlockPath} + +## log new line count of adblock.conf +wc -l ${AdBlockPath} >> ${LogFile} + +## end of log entry +echo "-----" >> ${LogFile} + +## reload service +service unbound reload + +if [ -d ${ExporterPath} ]; then + echo "# HELP node_unbound_adblock_count This is the count of adblock domains found in unbound" | tee "${ExporterPath}/node_unbound_adblock_count.prom" + echo "# TYPE node_unbound_adblock_count gauge" | tee -a "${ExporterPath}/node_unbound_adblock_count.prom" + echo "node_unbound_adblock_count $(wc -l ${AdBlockPath} | awk '{ print $1 }')" | tee -a "${ExporterPath}/node_unbound_adblock_count.prom" +fi diff --git a/dns/unbound-adblock/usr/local/etc/unbound/adblock.conf b/dns/unbound-adblock/usr/local/etc/unbound/adblock.conf new file mode 100644 index 0000000..e69de29 diff --git a/dns/unbound-adblock/usr/local/etc/unbound/unbound.conf b/dns/unbound-adblock/usr/local/etc/unbound/unbound.conf new file mode 100644 index 0000000..865de97 --- /dev/null +++ b/dns/unbound-adblock/usr/local/etc/unbound/unbound.conf @@ -0,0 +1,48 @@ +server: + access-control: 127.0.0.0/8 allow + access-control: 10.0.0.0/8 allow + access-control: 172.16.0.0/12 allow + access-control: 192.168.0.0/16 allow + aggressive-nsec: yes + cache-max-ttl: 14400 + cache-min-ttl: 1200 + hide-identity: yes + hide-version: yes + interface: 127.0.0.1 + prefetch: yes + rrset-roundrobin: yes + tls-cert-bundle: "/usr/local/share/certs/ca-root-nss.crt" + use-caps-for-id: yes + verbosity: 1 + auto-trust-anchor-file: "/usr/local/etc/unbound/root.key" + + include: "/usr/local/etc/unbound/adblock.conf" + + ## customize as needed + # num-threads: 4 # hw.ncpu + # msg-cache-slabs: 4 # hw.ncpu + # rrset-cache-slabs: 8 + # infra-cache-slabs: 8 + # key-cache-slabs: 8 + # msg-cache-size: 128M + # rrset-cache-size: 256M + # outgoing-range: 8192 + # num-queries-per-thread: 4096 + +remote-control: + control-enable: yes + control-interface: 127.0.0.1 + control-use-cert: "yes" + server-key-file: "/usr/local/etc/unbound/unbound_server.key" + server-cert-file: "/usr/local/etc/unbound/unbound_server.pem" + control-key-file: "/usr/local/etc/unbound/unbound_control.key" + control-cert-file: "/usr/local/etc/unbound/unbound_control.pem" + +forward-zone: + name: "." + forward-tls-upstream: yes + forward-addr: 1.1.1.1@853#one.one.one.one + forward-addr: 1.0.0.1@853#one.one.one.one + forward-addr: 8.8.4.4@853#dns.google + forward-addr: 8.8.8.8@853#dns.google + forward-addr: 9.9.9.9@853#dns.quad9.net diff --git a/dns/unbound/CMD b/dns/unbound/CMD new file mode 100644 index 0000000..6ffaa7b --- /dev/null +++ b/dns/unbound/CMD @@ -0,0 +1,5 @@ +chown unbound:wheel /usr/local/etc/unbound +/usr/local/sbin/unbound-control-setup +/usr/local/sbin/unbound-checkconf && echo "nameserver 127.0.0.1" > /etc/resolv.conf +service unbound restart +host bastille.org diff --git a/dns/unbound/LICENSE b/dns/unbound/LICENSE new file mode 100644 index 0000000..f5cdce0 --- /dev/null +++ b/dns/unbound/LICENSE @@ -0,0 +1,29 @@ +BSD 3-Clause License + +Copyright (c) 2019, Christer Edwards +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/dns/unbound/OVERLAY b/dns/unbound/OVERLAY new file mode 100644 index 0000000..73752c9 --- /dev/null +++ b/dns/unbound/OVERLAY @@ -0,0 +1 @@ +usr diff --git a/dns/unbound/PKG b/dns/unbound/PKG new file mode 100644 index 0000000..83b115b --- /dev/null +++ b/dns/unbound/PKG @@ -0,0 +1 @@ +ca_root_nss unbound diff --git a/dns/unbound/README.md b/dns/unbound/README.md new file mode 100644 index 0000000..c4fc214 --- /dev/null +++ b/dns/unbound/README.md @@ -0,0 +1,15 @@ +## Status +[![pipeline status](https://gitlab.com/bastillebsd-templates/unbound/badges/master/pipeline.svg)](https://gitlab.com/bastillebsd-templates/unbound/commits/master) + +## unbound +Bastille Template for an Unbound DNS container + +## Bootstrap +```shell +bastille bootstrap https://gitlab.com/bastillebsd-templates/unbound +``` + +## Usage +```shell +bastille template TARGET bastillebsd-templates/unbound +``` diff --git a/dns/unbound/SYSRC b/dns/unbound/SYSRC new file mode 100644 index 0000000..27476a0 --- /dev/null +++ b/dns/unbound/SYSRC @@ -0,0 +1 @@ +unbound_enable=YES diff --git a/dns/unbound/usr/local/etc/unbound/unbound.conf b/dns/unbound/usr/local/etc/unbound/unbound.conf new file mode 100644 index 0000000..c1cda02 --- /dev/null +++ b/dns/unbound/usr/local/etc/unbound/unbound.conf @@ -0,0 +1,45 @@ +server: + access-control: 127.0.0.0/8 allow + access-control: 10.0.0.0/8 allow + access-control: 172.16.0.0/12 allow + access-control: 192.168.0.0/16 allow + aggressive-nsec: yes + cache-max-ttl: 14400 + cache-min-ttl: 1200 + hide-identity: yes + hide-version: yes + interface: 127.0.0.1 + prefetch: yes + rrset-roundrobin: yes + tls-cert-bundle: "/usr/local/share/certs/ca-root-nss.crt" + use-caps-for-id: yes + verbosity: 1 + auto-trust-anchor-file: "/usr/local/etc/unbound/root.key" + + ## customize as needed + # num-threads: 4 # hw.ncpu + # msg-cache-slabs: 4 # hw.ncpu + # rrset-cache-slabs: 4 + # infra-cache-slabs: 4 + # key-cache-slabs: 4 + # msg-cache-size: 256M + # rrset-cache-size: 512M + # outgoing-range: 8192 + # num-queries-per-thread: 4096 + +remote-control: + control-enable: yes + control-interface: 127.0.0.1 + control-use-cert: "yes" + server-key-file: "/usr/local/etc/unbound/unbound_server.key" + server-cert-file: "/usr/local/etc/unbound/unbound_server.pem" + control-key-file: "/usr/local/etc/unbound/unbound_control.key" + control-cert-file: "/usr/local/etc/unbound/unbound_control.pem" + +forward-zone: + name: "." + forward-addr: 1.1.1.1@53 #cloudflare dns + forward-addr: 1.0.0.1@53 #cloudflare dns + forward-addr: 8.8.4.4@53 #google dns + forward-addr: 8.8.8.8@53 #google dns + forward-addr: 9.9.9.9@53 #quad9 dns diff --git a/java/openjdk/LICENSE b/java/openjdk/LICENSE new file mode 100644 index 0000000..f5cdce0 --- /dev/null +++ b/java/openjdk/LICENSE @@ -0,0 +1,29 @@ +BSD 3-Clause License + +Copyright (c) 2019, Christer Edwards +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/java/openjdk/PKG b/java/openjdk/PKG new file mode 100644 index 0000000..49880c0 --- /dev/null +++ b/java/openjdk/PKG @@ -0,0 +1 @@ +openjdk13 diff --git a/java/openjdk/README.md b/java/openjdk/README.md new file mode 100644 index 0000000..a79e7ce --- /dev/null +++ b/java/openjdk/README.md @@ -0,0 +1,15 @@ +# OpenJDK +Bastille template to bootstrap OpenJDK + +## Status +[![pipeline status](https://gitlab.com/bastillebsd-templates/openjdk/badges/master/pipeline.svg)](https://gitlab.com/bastillebsd-templates/openjdk/commits/master) + +## Bootstrap +```shell +bastille bootstrap https://gitlab.com/bastillebsd-templates/openjdk +``` + +## Usage +```shell +bastille template TARGET bastillebsd-templates/openjdk +``` diff --git a/lang/golang/LICENSE b/lang/golang/LICENSE new file mode 100644 index 0000000..f5cdce0 --- /dev/null +++ b/lang/golang/LICENSE @@ -0,0 +1,29 @@ +BSD 3-Clause License + +Copyright (c) 2019, Christer Edwards +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/lang/golang/PKG b/lang/golang/PKG new file mode 100644 index 0000000..4023f20 --- /dev/null +++ b/lang/golang/PKG @@ -0,0 +1 @@ +go diff --git a/lang/golang/README.md b/lang/golang/README.md new file mode 100644 index 0000000..caee762 --- /dev/null +++ b/lang/golang/README.md @@ -0,0 +1,15 @@ +## Status +[![pipeline status](https://gitlab.com/bastillebsd-templates/golang/badges/master/pipeline.svg)](https://gitlab.com/bastillebsd-templates/golang/commits/master) + +## golang +Bastille template to bootstrap Golang + +## Bootstrap +```shell +bastille bootstrap https://gitlab.com/bastillebsd-templates/golang +``` + +## Usage +```shell +bastille template TARGET bastillebsd-templates/golang +``` diff --git a/lang/luajit/LICENSE b/lang/luajit/LICENSE new file mode 100644 index 0000000..e18bbd9 --- /dev/null +++ b/lang/luajit/LICENSE @@ -0,0 +1,29 @@ +BSD 3-Clause License + +Copyright (c) 2020, Christer Edwards +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/lang/luajit/PKG b/lang/luajit/PKG new file mode 100644 index 0000000..df66435 --- /dev/null +++ b/lang/luajit/PKG @@ -0,0 +1 @@ +luajit diff --git a/lang/luajit/README.md b/lang/luajit/README.md new file mode 100644 index 0000000..1db9621 --- /dev/null +++ b/lang/luajit/README.md @@ -0,0 +1,18 @@ +## Status +[![pipeline status](https://gitlab.com/bastillebsd-templates/luajit/badges/master/pipeline.svg)](https://gitlab.com/bastillebsd-templates/luajit/commits/master) + +## luajit +Bastille template to bootstrap LuaJIT + +## Bootstrap + +```shell +bastille bootstrap https://gitlab.com/bastillebsd-templates/luajit +``` + +## Usage + +```shell +bastille template TARGET bastillebsd-templates/luajit + +``` diff --git a/lang/perl/LICENSE b/lang/perl/LICENSE new file mode 100644 index 0000000..f5cdce0 --- /dev/null +++ b/lang/perl/LICENSE @@ -0,0 +1,29 @@ +BSD 3-Clause License + +Copyright (c) 2019, Christer Edwards +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/lang/perl/PKG b/lang/perl/PKG new file mode 100644 index 0000000..a59a340 --- /dev/null +++ b/lang/perl/PKG @@ -0,0 +1 @@ +perl5-devel diff --git a/lang/perl/README.md b/lang/perl/README.md new file mode 100644 index 0000000..fdca291 --- /dev/null +++ b/lang/perl/README.md @@ -0,0 +1,15 @@ +## Status +[![pipeline status](https://gitlab.com/bastillebsd-templates/perl/badges/master/pipeline.svg)](https://gitlab.com/bastillebsd-templates/perl/commits/master) + +## perl +Bastille Template to bootstrap perl5-devel + +## Bootstrap +```shell +bastille bootstrap https://gitlab.com/bastillebsd-templates/perl +``` + +## Usage +```shell +bastille template TARGET bastillebsd-templates/perl +``` diff --git a/lang/php/LICENSE b/lang/php/LICENSE new file mode 100644 index 0000000..f5cdce0 --- /dev/null +++ b/lang/php/LICENSE @@ -0,0 +1,29 @@ +BSD 3-Clause License + +Copyright (c) 2019, Christer Edwards +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/lang/php/PKG b/lang/php/PKG new file mode 100644 index 0000000..2a957c8 --- /dev/null +++ b/lang/php/PKG @@ -0,0 +1 @@ +php74 diff --git a/lang/php/README.md b/lang/php/README.md new file mode 100644 index 0000000..71c075b --- /dev/null +++ b/lang/php/README.md @@ -0,0 +1,15 @@ +# PHP +Bastille template to bootstrap PHP + +## Status +[![pipeline status](https://gitlab.com/bastillebsd-templates/php/badges/master/pipeline.svg)](https://gitlab.com/bastillebsd-templates/php/commits/master) + +## Bootstrap +```shell +bastille bootstrap https://gitlab.com/bastillebsd-templates/php +``` + +## Usage +```shell +bastille template TARGET bastillebsd-templates/php +``` diff --git a/lang/php/SERVICE b/lang/php/SERVICE new file mode 100644 index 0000000..4e05355 --- /dev/null +++ b/lang/php/SERVICE @@ -0,0 +1 @@ +php-fpm start diff --git a/lang/php/SYSRC b/lang/php/SYSRC new file mode 100644 index 0000000..1f34839 --- /dev/null +++ b/lang/php/SYSRC @@ -0,0 +1 @@ +php_fpm_enable=YES diff --git a/lang/python/CMD b/lang/python/CMD new file mode 100644 index 0000000..25cc3ca --- /dev/null +++ b/lang/python/CMD @@ -0,0 +1 @@ +python -VV diff --git a/lang/python/LICENSE b/lang/python/LICENSE new file mode 100644 index 0000000..f5cdce0 --- /dev/null +++ b/lang/python/LICENSE @@ -0,0 +1,29 @@ +BSD 3-Clause License + +Copyright (c) 2019, Christer Edwards +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/lang/python/PKG b/lang/python/PKG new file mode 100644 index 0000000..ac20cf5 --- /dev/null +++ b/lang/python/PKG @@ -0,0 +1 @@ +python3 python diff --git a/lang/python/README.md b/lang/python/README.md new file mode 100644 index 0000000..56ee92c --- /dev/null +++ b/lang/python/README.md @@ -0,0 +1,15 @@ +# Python +Bastille template to bootstrap Python + +## Status +[![pipeline status](https://gitlab.com/bastillebsd-templates/python/badges/master/pipeline.svg)](https://gitlab.com/bastillebsd-templates/python/commits/master) + +## Bootstrap +```shell +bastille bootstrap https://gitlab.com/bastillebsd-templates/python +``` + +## Usage +```shell +bastille template TARGET bastillebsd-templates/python +``` diff --git a/lang/ruby/LICENSE b/lang/ruby/LICENSE new file mode 100644 index 0000000..f5cdce0 --- /dev/null +++ b/lang/ruby/LICENSE @@ -0,0 +1,29 @@ +BSD 3-Clause License + +Copyright (c) 2019, Christer Edwards +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/lang/ruby/PKG b/lang/ruby/PKG new file mode 100644 index 0000000..6cec934 --- /dev/null +++ b/lang/ruby/PKG @@ -0,0 +1 @@ +ruby diff --git a/lang/ruby/README.md b/lang/ruby/README.md new file mode 100644 index 0000000..7ed3126 --- /dev/null +++ b/lang/ruby/README.md @@ -0,0 +1,15 @@ +## Status +[![pipeline status](https://gitlab.com/bastillebsd-templates/ruby/badges/master/pipeline.svg)](https://gitlab.com/bastillebsd-templates/ruby/commits/master) + +## ruby +Bastille template to bootstrap ruby + +## Bootstrap +```shell +bastille bootstrap https://gitlab.com/bastillebsd-templates/ruby +``` + +## Usage +```shell +bastille template TARGET bastillebsd-templates/ruby +``` diff --git a/lang/rust/LICENSE b/lang/rust/LICENSE new file mode 100644 index 0000000..f5cdce0 --- /dev/null +++ b/lang/rust/LICENSE @@ -0,0 +1,29 @@ +BSD 3-Clause License + +Copyright (c) 2019, Christer Edwards +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/lang/rust/PKG b/lang/rust/PKG new file mode 100644 index 0000000..871732e --- /dev/null +++ b/lang/rust/PKG @@ -0,0 +1 @@ +rust diff --git a/lang/rust/README.md b/lang/rust/README.md new file mode 100644 index 0000000..d040f15 --- /dev/null +++ b/lang/rust/README.md @@ -0,0 +1,15 @@ +## Status +[![pipeline status](https://gitlab.com/bastillebsd-templates/rust/badges/master/pipeline.svg)](https://gitlab.com/bastillebsd-templates/rust/commits/master) + +## rust +Bastille Template to bootstrap Rust + +## Bootstrap +```shell +bastille bootstrap https://gitlab.com/bastillebsd-templates/rust +``` + +## Usage +```shell +bastille template TARGET bastillebsd-templates/rust +``` diff --git a/mail/postfix/CMD b/mail/postfix/CMD new file mode 100644 index 0000000..b6199bc --- /dev/null +++ b/mail/postfix/CMD @@ -0,0 +1,2 @@ +mkdir -p /usr/local/etc/mail +install -m 0644 /usr/local/share/postfix/mailer.conf.postfix /usr/local/etc/mail/mailer.conf diff --git a/mail/postfix/LICENSE b/mail/postfix/LICENSE new file mode 100644 index 0000000..f5cdce0 --- /dev/null +++ b/mail/postfix/LICENSE @@ -0,0 +1,29 @@ +BSD 3-Clause License + +Copyright (c) 2019, Christer Edwards +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/mail/postfix/OVERLAY b/mail/postfix/OVERLAY new file mode 100644 index 0000000..ee19d5d --- /dev/null +++ b/mail/postfix/OVERLAY @@ -0,0 +1 @@ +etc diff --git a/mail/postfix/PKG b/mail/postfix/PKG new file mode 100644 index 0000000..f6dc9c5 --- /dev/null +++ b/mail/postfix/PKG @@ -0,0 +1 @@ +postfix diff --git a/mail/postfix/README.md b/mail/postfix/README.md new file mode 100644 index 0000000..3dea5e7 --- /dev/null +++ b/mail/postfix/README.md @@ -0,0 +1,15 @@ +## Status +[![pipeline status](https://gitlab.com/bastillebsd-templates/postfix/badges/master/pipeline.svg)](https://gitlab.com/bastillebsd-templates/postfix/commits/master) + +## postfix +Bastille template to bootstrap postfix + +## Bootstrap +```shell +bastille bootstrap https://gitlab.com/bastillebsd-templates/postfix +``` + +## Usage +```shell +bastille template TARGET bastillebsd-templates/postfix +``` diff --git a/mail/postfix/SERVICE b/mail/postfix/SERVICE new file mode 100644 index 0000000..ebe90ac --- /dev/null +++ b/mail/postfix/SERVICE @@ -0,0 +1 @@ +postfix start diff --git a/mail/postfix/SYSRC b/mail/postfix/SYSRC new file mode 100644 index 0000000..580cf4c --- /dev/null +++ b/mail/postfix/SYSRC @@ -0,0 +1,2 @@ +postfix_enable=YES +sendmail_enable="NONE" diff --git a/mail/postfix/etc/periodic.conf.local b/mail/postfix/etc/periodic.conf.local new file mode 100644 index 0000000..d94d9cb --- /dev/null +++ b/mail/postfix/etc/periodic.conf.local @@ -0,0 +1,4 @@ +daily_clean_hoststat_enable="NO" +daily_status_mail_rejects_enable="NO" +daily_status_include_submit_mailq="NO" +daily_submit_queuerun="NO" diff --git a/multimedia/plexmediaserver-plexpass/LICENSE b/multimedia/plexmediaserver-plexpass/LICENSE new file mode 100644 index 0000000..f5cdce0 --- /dev/null +++ b/multimedia/plexmediaserver-plexpass/LICENSE @@ -0,0 +1,29 @@ +BSD 3-Clause License + +Copyright (c) 2019, Christer Edwards +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/multimedia/plexmediaserver-plexpass/PKG b/multimedia/plexmediaserver-plexpass/PKG new file mode 100644 index 0000000..8d19178 --- /dev/null +++ b/multimedia/plexmediaserver-plexpass/PKG @@ -0,0 +1 @@ +plexmediaserver-plexpass diff --git a/multimedia/plexmediaserver-plexpass/README.md b/multimedia/plexmediaserver-plexpass/README.md new file mode 100644 index 0000000..aaab7ea --- /dev/null +++ b/multimedia/plexmediaserver-plexpass/README.md @@ -0,0 +1,18 @@ +## Status +[![pipeline status](https://gitlab.com/bastillebsd-templates/plexmediaserver-plexpass/badges/master/pipeline.svg)](https://gitlab.com/bastillebsd-templates/plexmediaserver-plexpass/commits/master) + + +## plexmediaserver-plexpass +Bastille template for PlexMediaServer PlexPass + +## Bootstrap + +```shell +ishmael ~ # bastille bootstrap https://gitlab.com/BastilleBSD-Templates/plexmediaserver-plexpass +``` + +## Usage + +```shell +ishmael ~ # bastille template TARGET BastilleBSD-Templates/plexmediaserver-plexpass +``` diff --git a/multimedia/plexmediaserver-plexpass/SERVICE b/multimedia/plexmediaserver-plexpass/SERVICE new file mode 100644 index 0000000..c845151 --- /dev/null +++ b/multimedia/plexmediaserver-plexpass/SERVICE @@ -0,0 +1 @@ +plexmediaserver_plexpass start diff --git a/multimedia/plexmediaserver-plexpass/SYSRC b/multimedia/plexmediaserver-plexpass/SYSRC new file mode 100644 index 0000000..d9d9604 --- /dev/null +++ b/multimedia/plexmediaserver-plexpass/SYSRC @@ -0,0 +1 @@ +plexmediaserver_plexpass_enable=YES diff --git a/multimedia/plexmediaserver/LICENSE b/multimedia/plexmediaserver/LICENSE new file mode 100644 index 0000000..f5cdce0 --- /dev/null +++ b/multimedia/plexmediaserver/LICENSE @@ -0,0 +1,29 @@ +BSD 3-Clause License + +Copyright (c) 2019, Christer Edwards +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/multimedia/plexmediaserver/PKG b/multimedia/plexmediaserver/PKG new file mode 100644 index 0000000..c212d76 --- /dev/null +++ b/multimedia/plexmediaserver/PKG @@ -0,0 +1 @@ +plexmediaserver diff --git a/multimedia/plexmediaserver/README.md b/multimedia/plexmediaserver/README.md new file mode 100644 index 0000000..42842bc --- /dev/null +++ b/multimedia/plexmediaserver/README.md @@ -0,0 +1,18 @@ +## Status +[![pipeline status](https://gitlab.com/bastillebsd-templates/plexmediaserver/badges/master/pipeline.svg)](https://gitlab.com/bastillebsd-templates/plexmediaserver/commits/master) + + +## plexmediaserver +Bastille Template for a Plex Server Jail + +## Bootstrap + +```shell +ishmael ~ # bastille bootstrap https://gitlab.com/BastilleBSD-Templates/plexmediaserver +``` + +## Usage + +```shell +ishmael ~ # bastille template TARGET BastilleBSD-Templates/plexmediaserver +``` diff --git a/multimedia/plexmediaserver/SERVICE b/multimedia/plexmediaserver/SERVICE new file mode 100644 index 0000000..5a4ebd9 --- /dev/null +++ b/multimedia/plexmediaserver/SERVICE @@ -0,0 +1 @@ +plexmediaserver start diff --git a/multimedia/plexmediaserver/SYSRC b/multimedia/plexmediaserver/SYSRC new file mode 100644 index 0000000..dbcb360 --- /dev/null +++ b/multimedia/plexmediaserver/SYSRC @@ -0,0 +1 @@ +plexmediaserver_enable=YES diff --git a/net-mgmt/prometheus/LICENSE b/net-mgmt/prometheus/LICENSE new file mode 100644 index 0000000..f5cdce0 --- /dev/null +++ b/net-mgmt/prometheus/LICENSE @@ -0,0 +1,29 @@ +BSD 3-Clause License + +Copyright (c) 2019, Christer Edwards +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/net-mgmt/prometheus/OVERLAY b/net-mgmt/prometheus/OVERLAY new file mode 100644 index 0000000..73752c9 --- /dev/null +++ b/net-mgmt/prometheus/OVERLAY @@ -0,0 +1 @@ +usr diff --git a/net-mgmt/prometheus/PKG b/net-mgmt/prometheus/PKG new file mode 100644 index 0000000..26b17a6 --- /dev/null +++ b/net-mgmt/prometheus/PKG @@ -0,0 +1 @@ +prometheus diff --git a/net-mgmt/prometheus/README.md b/net-mgmt/prometheus/README.md new file mode 100644 index 0000000..34acc03 --- /dev/null +++ b/net-mgmt/prometheus/README.md @@ -0,0 +1,17 @@ +## Status +[![pipeline status](https://gitlab.com/bastillebsd-templates/prometheus/badges/master/pipeline.svg)](https://gitlab.com/bastillebsd-templates/prometheus/commits/master) + +## prometheus +Bastille Template to bootstrap Prometheus. + +## Bootstrap + +```shell +bastille bootstrap https://gitlab.com/bastillebsd-templates/prometheus +``` + +## Usage + +```shell +bastille template TARGET bastillebsd-templates/prometheus +``` diff --git a/net-mgmt/prometheus/SERVICE b/net-mgmt/prometheus/SERVICE new file mode 100644 index 0000000..e81fbfb --- /dev/null +++ b/net-mgmt/prometheus/SERVICE @@ -0,0 +1 @@ +prometheus start diff --git a/net-mgmt/prometheus/SYSRC b/net-mgmt/prometheus/SYSRC new file mode 100644 index 0000000..a81d1ea --- /dev/null +++ b/net-mgmt/prometheus/SYSRC @@ -0,0 +1 @@ +prometheus_enable=YES diff --git a/net-mgmt/prometheus/usr/local/etc/prometheus.yml b/net-mgmt/prometheus/usr/local/etc/prometheus.yml new file mode 100644 index 0000000..af33d87 --- /dev/null +++ b/net-mgmt/prometheus/usr/local/etc/prometheus.yml @@ -0,0 +1,29 @@ +# my global config +global: + scrape_interval: 15s # Set the scrape interval to every 15 seconds. Default is every 1 minute. + evaluation_interval: 15s # Evaluate rules every 15 seconds. The default is every 1 minute. + # scrape_timeout is set to the global default (10s). + +# Alertmanager configuration +alerting: + alertmanagers: + - static_configs: + - targets: + # - alertmanager:9093 + +# Load rules once and periodically evaluate them according to the global 'evaluation_interval'. +rule_files: + # - "first_rules.yml" + # - "second_rules.yml" + +# A scrape configuration containing exactly one endpoint to scrape: +# Here it's Prometheus itself. +scrape_configs: + # The job name is added as a label `job=` to any timeseries scraped from this config. + - job_name: 'prometheus' + + # metrics_path defaults to '/metrics' + # scheme defaults to 'http'. + + static_configs: + - targets: ['localhost:9090'] diff --git a/net-mgmt/telegraf/LICENSE b/net-mgmt/telegraf/LICENSE new file mode 100644 index 0000000..f5cdce0 --- /dev/null +++ b/net-mgmt/telegraf/LICENSE @@ -0,0 +1,29 @@ +BSD 3-Clause License + +Copyright (c) 2019, Christer Edwards +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/net-mgmt/telegraf/PKG b/net-mgmt/telegraf/PKG new file mode 100644 index 0000000..e6b8775 --- /dev/null +++ b/net-mgmt/telegraf/PKG @@ -0,0 +1 @@ +telegraf diff --git a/net-mgmt/telegraf/README.md b/net-mgmt/telegraf/README.md new file mode 100644 index 0000000..7dc2b11 --- /dev/null +++ b/net-mgmt/telegraf/README.md @@ -0,0 +1,15 @@ +## Status +[![pipeline status](https://gitlab.com/bastillebsd-templates/telegraf/badges/master/pipeline.svg)](https://gitlab.com/bastillebsd-templates/telegraf/commits/master) + +## telegraf +Bastille Template to bootstrap Telegraf + +## Bootstrap +```shell +bastille bootstrap https://gitlab.com/bastillebsd-templates/telegraf +``` + +## Usage +```shell +bastille template TARGET bastillebsd-templates/telegraf +``` diff --git a/net-mgmt/telegraf/SERVICE b/net-mgmt/telegraf/SERVICE new file mode 100644 index 0000000..cf07a82 --- /dev/null +++ b/net-mgmt/telegraf/SERVICE @@ -0,0 +1 @@ +telegraf restart diff --git a/net-mgmt/telegraf/SYSRC b/net-mgmt/telegraf/SYSRC new file mode 100644 index 0000000..068ac49 --- /dev/null +++ b/net-mgmt/telegraf/SYSRC @@ -0,0 +1 @@ +telegraf_enable=YES diff --git a/net-mgmt/zabbix-agent/Bastillefile b/net-mgmt/zabbix-agent/Bastillefile new file mode 100644 index 0000000..d5b51d1 --- /dev/null +++ b/net-mgmt/zabbix-agent/Bastillefile @@ -0,0 +1,4 @@ +PKG zabbix54-agent +CMD cp /usr/local/etc/zabbix54/zabbix_agentd.conf.sample /usr/local/etc/zabbix54/zabbix_agentd.conf +SYSRC zabbix_agentd_enable=YES +SERVICE zabbix_agentd start diff --git a/net-mgmt/zabbix-agent/LICENSE b/net-mgmt/zabbix-agent/LICENSE new file mode 100644 index 0000000..0f33c9f --- /dev/null +++ b/net-mgmt/zabbix-agent/LICENSE @@ -0,0 +1,29 @@ +BSD 3-Clause License + +Copyright (c) 2019-2021, Christer Edwards +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/net-mgmt/zabbix-agent/README.md b/net-mgmt/zabbix-agent/README.md new file mode 100644 index 0000000..55af582 --- /dev/null +++ b/net-mgmt/zabbix-agent/README.md @@ -0,0 +1,33 @@ +## Status +[![pipeline status](https://gitlab.com/bastillebsd-templates/zabbix-agent/badges/master/pipeline.svg)](https://gitlab.com/bastillebsd-templates/zabbix-agent/commits/master) + +## Bootstrap + +```shell +bastille bootstrap https://github.com/bastillebsd-templates/zabbix-agent +``` + +## Usage + +```shell +bastille template TARGET bastillebsd-templates/zabbix-agent +``` + +## Post Install Steps + +Once this is done running there are a couple of manual steps you have to do. First edit the file + + /usr/local/etc/zabbix5/zabbix_agentd.conf + +and edit the following lines with your server ip/hostname, and your client's hostname: + + Server=1.1.1.1 + ServerActive=1.1.1.1 + Hostname=hostname.domain.tld + +then restart the zabbix agent: + +```shell +bastille service TARGET zabbix-agentd restart +``` +and at this point you can add this client to your zabbix server. diff --git a/net-mgmt/zabbix-server/Bastillefile b/net-mgmt/zabbix-server/Bastillefile new file mode 100644 index 0000000..a270952 --- /dev/null +++ b/net-mgmt/zabbix-server/Bastillefile @@ -0,0 +1,25 @@ +INCLUDE bastillebsd-templates/nginx +INCLUDE bastillebsd-templates/mysql-server +PKG zabbix54-server zabbix54-frontend zabbix54-agent + +SYSRC zabbix_server_enable=YES +SYSRC zabbix_agentd_enable=YES +SYSRC nginx_enable=YES + +## Make the needed SCRIPTS directory +#CMD mkdir /usr/local/etc/zabbix5/scripts + +## Overlay to the system the scripts needed +#OVERLAY zfs-discovery.sh /usr/local/zabbix5/scripts +#OVERLAY zpool-discovery.sh /usr/local/zabbix5/scripts +#OVERLAY nginx.conf /usr/local/etc/nginx/nginx.conf + +# Set the correct owner for the scipts directory +#CMD chown -R zabbix /usr/lcoal/etc/zabbix5/scripts +#CMD chmod +x /usr/local/etc/zabbix5/scripts + +CMD cp /usr/local/etc/zabbix54/zabbix_agentd.conf.sample /usr/local/etc/zabbix54/zabbix_agentd.conf +CMD cp /usr/local/etc/zabbix54/zabbix_server.conf.sample /usr/local/etc/zabbix54/zabbix_server.conf + +SERVICE zabbix_agentd start +SERVICE zabbix_server start diff --git a/net-mgmt/zabbix-server/README.md b/net-mgmt/zabbix-server/README.md new file mode 100644 index 0000000..3430f7d --- /dev/null +++ b/net-mgmt/zabbix-server/README.md @@ -0,0 +1,17 @@ +## Status +[![pipeline status](https://gitlab.com/bastillebsd-templates/zabbix-server/badges/master/pipeline.svg)](https://gitlab.com/bastillebsd-templates/zabbix-server/commits/master) + +## zabbix-server +Bastille template to bootstrap zabbix-server + +## Bootstrap + +```shell +bastille bootstrap https://gitlab.com/bastillebsd-templates/zabbix-server +``` + +## Usage + +```shell +bastille template TARGET bastillebsd-templates/zabbix-server +``` diff --git a/net/asterisk/Bastillefile b/net/asterisk/Bastillefile new file mode 100644 index 0000000..480485f --- /dev/null +++ b/net/asterisk/Bastillefile @@ -0,0 +1,3 @@ +PKG asterisk18 +SYSRC asterisk_enable=YES +SERVICE asterisk start diff --git a/net/asterisk/LICENSE b/net/asterisk/LICENSE new file mode 100644 index 0000000..0f33c9f --- /dev/null +++ b/net/asterisk/LICENSE @@ -0,0 +1,29 @@ +BSD 3-Clause License + +Copyright (c) 2019-2021, Christer Edwards +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/net/asterisk/README.md b/net/asterisk/README.md new file mode 100644 index 0000000..4d6381b --- /dev/null +++ b/net/asterisk/README.md @@ -0,0 +1,17 @@ +## Status +[![pipeline status](https://gitlab.com/bastillebsd-templates/asterisk/badges/master/pipeline.svg)](https://gitlab.com/bastillebsd-templates/asterisk/commits/master) + +## asterisk +Bastille template to boostrap asterisk + +## Bootstrap + +```shell +bastille bootstrap https://gitlab.com/bastillebsd-templates/asterisk +``` + +## Usage + +```shell +bastille template TARGET bastillebsd-templates/asterisk +``` diff --git a/security/openssh-server/Bastillefile b/security/openssh-server/Bastillefile new file mode 100644 index 0000000..c37e090 --- /dev/null +++ b/security/openssh-server/Bastillefile @@ -0,0 +1,3 @@ +SYSRC sshd_enable=YES +SYSRC sshd_flags="" +SERVICE sshd start diff --git a/security/openssh-server/LICENSE b/security/openssh-server/LICENSE new file mode 100644 index 0000000..0f33c9f --- /dev/null +++ b/security/openssh-server/LICENSE @@ -0,0 +1,29 @@ +BSD 3-Clause License + +Copyright (c) 2019-2021, Christer Edwards +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/security/openssh-server/README.md b/security/openssh-server/README.md new file mode 100644 index 0000000..4dddb86 --- /dev/null +++ b/security/openssh-server/README.md @@ -0,0 +1,36 @@ +## Status +[![pipeline status](https://gitlab.com/bastillebsd-templates/openssh-server/badges/master/pipeline.svg)](https://gitlab.com/bastillebsd-templates/openssh-server/commits/master) + +# openssh-server +Bastille template to bootstrap openssh-server + +## Bootstrap + +```shell +bastille bootstrap https://gitlab.com/bastillebsd-templates/openssh-server +``` + +## Usage + +```shell +bastille template TARGET bastillebsd-templates/openssh-server +``` + +## Optional: +The following are optional customizations to this template and basic +instructions on how to do so. + +### custom config +Use a custom `/etc/ssh/sshd_config` in the template: + +1. fork bastillebsd-templates/openssh-server +2. add an `CP etc` directive to the Bastillefile +3. add an `etc/ssh/sshd_config` in the template +4. commit; bootstrap fork; apply template + +### Use custom `sshd_flags`: +Use custom `sshd_flags` in jailed ssh service: + +1. fork bastillebsd-templates/openssh-server +2. update the Bastillefile and add `SYSRC sshd_flags=""` +3. commit; bootstrap fork; apply template diff --git a/security/vault/Bastillefile b/security/vault/Bastillefile new file mode 100644 index 0000000..af500bd --- /dev/null +++ b/security/vault/Bastillefile @@ -0,0 +1,5 @@ +PKG vault +CP usr / +CMD mkdir -p /var/db/vault +SYSRC vault_enable=YES +SERVICE vault start diff --git a/security/vault/LICENSE b/security/vault/LICENSE new file mode 100644 index 0000000..0f33c9f --- /dev/null +++ b/security/vault/LICENSE @@ -0,0 +1,29 @@ +BSD 3-Clause License + +Copyright (c) 2019-2021, Christer Edwards +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/security/vault/README.md b/security/vault/README.md new file mode 100644 index 0000000..844c018 --- /dev/null +++ b/security/vault/README.md @@ -0,0 +1,14 @@ +## Status +[![pipeline status](https://gitlab.com/bastillebsd-templates/vault/badges/master/pipeline.svg)](https://gitlab.com/bastillebsd-templates/vault/commits/master) + +## Bootstrap + +```shell +bastille bootstrap https://github.com/bastillebsd-templates/vault +``` + +## Usage + +```shell +bastille template TARGET bastillebsd-templates/vault +``` diff --git a/security/vault/usr/local/etc/vault.hcl b/security/vault/usr/local/etc/vault.hcl new file mode 100644 index 0000000..d6258a8 --- /dev/null +++ b/security/vault/usr/local/etc/vault.hcl @@ -0,0 +1,11 @@ +# disable_mlock = true +# ui = true + +listener "tcp" { + address = "127.0.0.1:8200" + tls_disable = "true" +} + +storage "file" { + path = "/var/db/vault" +} diff --git a/shells/zsh-antigen/CMD b/shells/zsh-antigen/CMD new file mode 100644 index 0000000..888c823 --- /dev/null +++ b/shells/zsh-antigen/CMD @@ -0,0 +1,2 @@ +/usr/bin/fetch -m https://git.io/antigen -o /usr/local/share/zsh/antigen.zsh +/usr/bin/chsh -s /usr/local/bin/zsh diff --git a/shells/zsh-antigen/LICENSE b/shells/zsh-antigen/LICENSE new file mode 100644 index 0000000..994cf0b --- /dev/null +++ b/shells/zsh-antigen/LICENSE @@ -0,0 +1,29 @@ +BSD 3-Clause License + +Copyright (c) 2018-2020, Christer Edwards +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +* Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/shells/zsh-antigen/OVERLAY b/shells/zsh-antigen/OVERLAY new file mode 100644 index 0000000..08d9cf1 --- /dev/null +++ b/shells/zsh-antigen/OVERLAY @@ -0,0 +1,2 @@ +root +usr diff --git a/shells/zsh-antigen/PKG b/shells/zsh-antigen/PKG new file mode 100644 index 0000000..91e0908 --- /dev/null +++ b/shells/zsh-antigen/PKG @@ -0,0 +1 @@ +zsh ca_root_nss git-lite diff --git a/shells/zsh-antigen/README.md b/shells/zsh-antigen/README.md new file mode 100644 index 0000000..4618e2e --- /dev/null +++ b/shells/zsh-antigen/README.md @@ -0,0 +1,23 @@ +## Status +[![pipeline status](https://gitlab.com/bastillebsd-templates/zsh-antigen/badges/master/pipeline.svg)](https://gitlab.com/bastillebsd-templates/zsh-antigen/commits/master) + +## zsh-antigen +Bastille Template: zsh-antigen + +Fetch and apply this template with: + +```shell +bastille bootstrap https://gitlab.com/BastilleBSD-Templates/zsh-antigen +bastille template TARGET BastilleBSD-Templates/zsh-antigen +``` + +This template will place/update the `antigen.zsh` script and a `.zshrc` in +root's home folder. On first login antigen will bootstrap all required +components. + +Note: if you want to add the `.zshrc` to all new users this needs to be done in +the release and not the jail. + +Place the `.zshrc` into `bastille/releases/$RELEASE/usr/share/skel/dot.zshrc`. + +Note: PKG requires `ca_root_nss` and `git-lite` as dependencies of antigen. diff --git a/shells/zsh-antigen/root/.zshrc b/shells/zsh-antigen/root/.zshrc new file mode 100644 index 0000000..404a763 --- /dev/null +++ b/shells/zsh-antigen/root/.zshrc @@ -0,0 +1,7 @@ +source /usr/local/share/zsh/antigen.zsh +antigen use oh-my-zsh +antigen bundle zsh-users/zsh-syntax-highlighting +antigen bundle zsh-users/zsh-autosuggestions +antigen bundle zsh-users/zsh-completions +antigen theme gentoo +antigen apply diff --git a/shells/zsh-antigen/usr/local/share/zsh/antigen.zsh b/shells/zsh-antigen/usr/local/share/zsh/antigen.zsh new file mode 100644 index 0000000..e813207 --- /dev/null +++ b/shells/zsh-antigen/usr/local/share/zsh/antigen.zsh @@ -0,0 +1,2057 @@ +###################################################################### +# This file was autogenerated by `make`. Do not edit it directly! +###################################################################### +# Antigen: A simple plugin manager for zsh + # Authors: Shrikant Sharat Kandula + # and Contributors + # Homepage: http://antigen.sharats.me + # License: MIT License +zmodload zsh/parameter +autoload -U is-at-least + +# While boot.zsh is part of the ext/cache functionallity it may be disabled +# with ANTIGEN_CACHE flag, and it's always compiled with antigen.zsh +if [[ $ANTIGEN_CACHE != false ]]; then + ANTIGEN_CACHE="${ANTIGEN_CACHE:-${ADOTDIR:-$HOME/.antigen}/init.zsh}" + ANTIGEN_RSRC="${ANTIGEN_RSRC:-${ADOTDIR:-$HOME/.antigen}/.resources}" + + # It may not be necessary to check ANTIGEN_AUTO_CONFIG. + if [[ $ANTIGEN_AUTO_CONFIG != false && -f $ANTIGEN_RSRC ]]; then + # Check the list of files for configuration changes (uses -nt comp) + ANTIGEN_CHECK_FILES=$(cat $ANTIGEN_RSRC 2> /dev/null) + ANTIGEN_CHECK_FILES=(${(@f)ANTIGEN_CHECK_FILES}) + + for config in $ANTIGEN_CHECK_FILES; do + if [[ "$config" -nt "$config.zwc" ]]; then + # Flag configuration file as newer + { zcompile "$config" } &! + # Kill cache file in order to force full loading (see a few lines below) + [[ -f "$ANTIGEN_CACHE" ]] && rm -f "$ANTIGEN_CACHE" + fi + done + fi + + # If there is a cache file do load from it + if [[ -f $ANTIGEN_CACHE && ! $_ANTIGEN_CACHE_LOADED == true ]]; then + # Wrap antigen in order to defer cache source until `antigen-apply` + antigen() { + if [[ $1 == "apply" ]]; then + source "$ANTIGEN_CACHE" + # Handle `antigen-init` command properly + elif [[ $1 == "init" ]]; then + source "$2" + fi + } + # Do not continue loading antigen as cache bundle takes care of it. + return 0 + fi +fi +[[ -z "$_ANTIGEN_INSTALL_DIR" ]] && _ANTIGEN_INSTALL_DIR=${0:A:h} + +# Each line in this string has the following entries separated by a space +# character. +# , , , +[[ $_ANTIGEN_CACHE_LOADED != true ]] && typeset -aU _ANTIGEN_BUNDLE_RECORD + +# Do not load anything if git is not available. +if (( ! $+commands[git] )); then + echo 'Antigen: Please install git to use Antigen.' >&2 + return 1 +fi + +# Used to defer compinit/compdef +typeset -a __deferred_compdefs +compdef () { __deferred_compdefs=($__deferred_compdefs "$*") } + +# A syntax sugar to avoid the `-` when calling antigen commands. With this +# function, you can write `antigen-bundle` as `antigen bundle` and so on. +antigen () { + local cmd="$1" + if [[ -z "$cmd" ]]; then + echo 'Antigen: Please give a command to run.' >&2 + return 1 + fi + shift + + if (( $+functions[antigen-$cmd] )); then + "antigen-$cmd" "$@" + return $? + else + echo "Antigen: Unknown command: $cmd" >&2 + return 1 + fi +} +# Returns the bundle's git revision +# +# Usage +# -antigen-bundle-rev bundle-name [is_local_clone] +# +# Returns +# Bundle rev-parse output (branch name or short ref name) +-antigen-bundle-rev () { + local bundle=$1 + local is_local_clone=$2 + + local bundle_path=$bundle + # Get bunde path inside $ADOTDIR if bundle was effectively cloned + if [[ "$is_local_clone" == "true" ]]; then + bundle_path=$(-antigen-get-clone-dir $bundle) + fi + + local ref + ref=$(git --git-dir="$bundle_path/.git" rev-parse --abbrev-ref '@' 2>/dev/null) + + # Avoid 'HEAD' when in detached mode + if [[ $ref == "HEAD" ]]; then + ref=$(git --git-dir="$bundle_path/.git" describe --tags --exact-match 2>/dev/null \ + || git --git-dir="$bundle_path/.git" rev-parse --short '@' 2>/dev/null || "-") + fi + echo $ref +} +# Usage: +# -antigen-bundle-short-name "https://github.com/user/repo.git[|*]" "[branch/name]" +# Returns: +# user/repo@branch/name +-antigen-bundle-short-name () { + local bundle_name="${1%|*}" + local bundle_branch="$2" + local match mbegin mend MATCH MBEGIN MEND + + [[ "$bundle_name" =~ '.*/(.*/.*).*$' ]] && bundle_name=$match[1] + bundle_name="${bundle_name%.git*}" + + if [[ -n $bundle_branch ]]; then + bundle_name="$bundle_name@$bundle_branch" + fi + + echo $bundle_name +} +# Echo the bundle specs as in the record. The first line is not echoed since it +# is a blank line. +-antigen-echo-record () { + echo ${(j:\n:)_ANTIGEN_BUNDLE_RECORD} +} +# Filters _ANTIGEN_BUNDLE_RECORD for $1 +# +# Usage +# -antigen-find-bundle example/bundle +# +# Returns +# String if bundle is found +-antigen-find-bundle () { + echo $(-antigen-find-record $1 | cut -d' ' -f1) +} + +# Filters _ANTIGEN_BUNDLE_RECORD for $1 +# +# Usage +# -antigen-find-record example/bundle +# +# Returns +# String if record is found +-antigen-find-record () { + local bundle=$1 + + if [[ $# -eq 0 ]]; then + return 1 + fi + + local record=${bundle/\|/\\\|} + echo "${_ANTIGEN_BUNDLE_RECORD[(r)*$record*]}" +} +# Returns bundle names from _ANTIGEN_BUNDLE_RECORD +# +# Usage +# -antigen-get-bundles [--short|--simple|--long] +# +# Returns +# List of bundles installed +-antigen-get-bundles () { + local mode revision url bundle_name bundle_entry loc no_local_clone + local record bundle make_local_clone + mode=${1:-"--short"} + + for record in $_ANTIGEN_BUNDLE_RECORD; do + bundle=(${(@s/ /)record}) + url=$bundle[1] + loc=$bundle[2] + make_local_clone=$bundle[4] + + bundle_name=$(-antigen-bundle-short-name $url) + + case "$mode" in + --short) + # Only check revision for bundle with a requested branch + if [[ $url == *\|* ]]; then + revision=$(-antigen-bundle-rev $url $make_local_clone) + else + revision="master" + fi + + if [[ $loc != '/' ]]; then + bundle_name="$bundle_name ~ $loc" + fi + echo "$bundle_name @ $revision" + ;; + --simple) + echo "$bundle_name" + ;; + --long) + echo "$record" + ;; + esac + done +} +# Usage: +# -antigen-get-clone-dir "https://github.com/zsh-users/zsh-syntax-highlighting.git[|feature/branch]" +# Returns: +# $ANTIGEN_BUNDLES/zsh-users/zsh-syntax-highlighting[-feature-branch] +-antigen-get-clone-dir () { + local bundle="$1" + local url="${bundle%|*}" + local branch match mbegin mend MATCH MBEGIN MEND + [[ "$bundle" =~ "\|" ]] && branch="${bundle#*|}" + + # Takes a repo url and mangles it, giving the path that this url will be + # cloned to. Doesn't actually clone anything. + local clone_dir="$ANTIGEN_BUNDLES" + + url=$(-antigen-bundle-short-name $url) + + # Suffix with branch/tag name + [[ -n "$branch" ]] && url="$url-${branch//\//-}" + url=${url//\*/x} + + echo "$clone_dir/$url" +} +# Returns bundles flagged as make_local_clone +# +# Usage +# -antigen-cloned-bundles +# +# Returns +# Bundle metadata +-antigen-get-cloned-bundles() { + -antigen-echo-record | + awk '$4 == "true" {print $1}' | + sort -u +} +# Returns a list of themes from a default library (omz) +# +# Usage +# -antigen-get-themes +# +# Returns +# List of themes by name +-antigen-get-themes () { + local library='robbyrussell/oh-my-zsh' + local bundle=$(-antigen-find-bundle $library) + + if [[ -n "$bundle" ]]; then + local dir=$(-antigen-get-clone-dir $ANTIGEN_DEFAULT_REPO_URL) + echo $(ls $dir/themes/ | grep '.zsh-theme$' | sed 's/.zsh-theme//') + fi + + return 0 +} + +# This function check ZSH_EVAL_CONTEXT to determine if running in interactive shell. +# +# Usage +# -antigen-interactive-mode +# +# Returns +# Either true or false depending if we are running in interactive mode +-antigen-interactive-mode () { + WARN "-antigen-interactive-mode: $ZSH_EVAL_CONTEXT \$_ANTIGEN_INTERACTIVE = $_ANTIGEN_INTERACTIVE" + if [[ $_ANTIGEN_INTERACTIVE != "" ]]; then + [[ $_ANTIGEN_INTERACTIVE == true ]]; + return + fi + + [[ "$ZSH_EVAL_CONTEXT" == toplevel* || "$ZSH_EVAL_CONTEXT" == cmdarg* ]]; +} +# Parses and retrieves a remote branch given a branch name. +# +# If the branch name contains '*' it will retrieve remote branches +# and try to match against tags and heads, returning the latest matching. +# +# Usage +# -antigen-parse-branch https://github.com/user/repo.git x.y.z +# +# Returns +# Branch name +-antigen-parse-branch () { + local url="$1" branch="$2" branches + + local match mbegin mend MATCH MBEGIN MEND + + if [[ "$branch" =~ '\*' ]]; then + branches=$(git ls-remote --tags -q "$url" "$branch"|cut -d'/' -f3|sort -n|tail -1) + # There is no --refs flag in git 1.8 and below, this way we + # emulate this flag -- also git 1.8 ref order is undefined. + branch=${${branches#*/*/}%^*} # Why you are like this? + fi + + echo $branch +} +-antigen-update-repos () { + local repo bundle url target + local log=/tmp/antigen-v2-migrate.log + + echo "It seems you have bundles cloned with Antigen v1.x." + echo "We'll try to convert directory structure to v2." + echo + + echo -n "Moving bundles to '\$ADOTDIR/bundles'... " + + # Migrate old repos -> bundles + local errors=0 + for repo in $ADOTDIR/repos/*; do + bundle=${repo/$ADOTDIR\/repos\//} + bundle=${bundle//-SLASH-/\/} + bundle=${bundle//-COLON-/\:} + bundle=${bundle//-STAR-/\*} + url=${bundle//-PIPE-/\|} + target=$(-antigen-get-clone-dir $url) + mkdir -p "${target:A:h}" + echo " ---> ${repo/$ADOTDIR\/} -> ${target/$ADOTDIR\/}" | tee > $log + mv "$repo" "$target" &> $log + if [[ $? != 0 ]]; then + echo "Failed to migrate '$repo'!." + errors+=1 + fi + done + + if [[ $errors == 0 ]]; then + echo "Done." + else + echo "An error ocurred!" + fi + echo + + if [[ "$(ls -A $ADOTDIR/repos | wc -l | xargs)" == 0 ]]; then + echo "You can safely remove \$ADOTDIR/repos." + else + echo "Some bundles couldn't be migrated. See \$ADOTDIR/repos." + fi + + echo + if [[ $errors == 0 ]]; then + echo "Bundles migrated successfuly." + rm $log + else + echo "Some errors occured. Review migration log in '$log'." + fi + antigen-reset +} +# Ensure that a clone exists for the given repo url and branch. If the first +# argument is `update` and if a clone already exists for the given repo +# and branch, it is pull-ed, i.e., updated. +# +# This function expects three arguments in order: +# - 'url=' +# - 'update=true|false' +# - 'verbose=true|false' +# +# Returns true|false Whether cloning/pulling was succesful +-antigen-ensure-repo () { + # Argument defaults. Previously using ${1:?"missing url argument"} format + # but it seems to mess up with cram + if (( $# < 1 )); then + echo "Antigen: Missing url argument." + return 1 + fi + + # The url. No sane default for this, so just empty. + local url=$1 + # Check if we have to update. + local update=${2:-false} + # Verbose output. + local verbose=${3:-false} + + shift $# + + # Get the clone's directory as per the given repo url and branch. + local clone_dir=$(-antigen-get-clone-dir $url) + if [[ -d "$clone_dir" && $update == false ]]; then + return true + fi + + # A temporary function wrapping the `git` command with repeated arguments. + --plugin-git () { + (\cd -q "$clone_dir" && eval ${ANTIGEN_CLONE_ENV} git --git-dir="$clone_dir/.git" --no-pager "$@" &>>! $ANTIGEN_LOG) + } + + local success=false + + # If its a specific branch that we want, checkout that branch. + local branch="master" # TODO FIX THIS + if [[ $url == *\|* ]]; then + branch="$(-antigen-parse-branch ${url%|*} ${url#*|})" + fi + + if [[ ! -d $clone_dir ]]; then + eval ${ANTIGEN_CLONE_ENV} git clone ${=ANTIGEN_CLONE_OPTS} --branch "$branch" -- "${url%|*}" "$clone_dir" &>> $ANTIGEN_LOG + success=$? + elif $update; then + # Save current revision. + local old_rev="$(--plugin-git rev-parse HEAD)" + # Pull changes if update requested. + --plugin-git checkout "$branch" + --plugin-git pull origin "$branch" + success=$? + + # Update submodules. + --plugin-git submodule update ${=ANTIGEN_SUBMODULE_OPTS} + # Get the new revision. + local new_rev="$(--plugin-git rev-parse HEAD)" + fi + + if [[ -n $old_rev && $old_rev != $new_rev ]]; then + echo Updated from $old_rev[0,7] to $new_rev[0,7]. + if $verbose; then + --plugin-git log --oneline --reverse --no-merges --stat '@{1}..' + fi + fi + + # Remove the temporary git wrapper function. + unfunction -- --plugin-git + + return $success +} +# Helper function: Same as `$1=$2`, but will only happen if the name +# specified by `$1` is not already set. +-antigen-set-default () { + local arg_name="$1" + local arg_value="$2" + eval "test -z \"\$$arg_name\" && typeset -g $arg_name='$arg_value'" +} + +-antigen-env-setup () { + typeset -gU fpath path + + # Pre-startup initializations. + -antigen-set-default ANTIGEN_OMZ_REPO_URL \ + https://github.com/robbyrussell/oh-my-zsh.git + -antigen-set-default ANTIGEN_PREZTO_REPO_URL \ + https://github.com/sorin-ionescu/prezto.git + -antigen-set-default ANTIGEN_DEFAULT_REPO_URL $ANTIGEN_OMZ_REPO_URL + + # Default Antigen directory. + -antigen-set-default ADOTDIR $HOME/.antigen + [[ ! -d $ADOTDIR ]] && mkdir -p $ADOTDIR + + # Defaults bundles directory. + -antigen-set-default ANTIGEN_BUNDLES $ADOTDIR/bundles + + # If there is no bundles directory, create it. + if [[ ! -d $ANTIGEN_BUNDLES ]]; then + mkdir -p $ANTIGEN_BUNDLES + # Check for v1 repos directory, transform it to v2 format. + [[ -d $ADOTDIR/repos ]] && -antigen-update-repos + fi + + -antigen-set-default ANTIGEN_COMPDUMP "${ADOTDIR:-$HOME}/.zcompdump" + -antigen-set-default ANTIGEN_LOG /dev/null + + # CLONE_OPTS uses ${=CLONE_OPTS} expansion so don't use spaces + # for arguments that can be passed as `--key=value`. + -antigen-set-default ANTIGEN_CLONE_ENV "GIT_TERMINAL_PROMPT=0" + -antigen-set-default ANTIGEN_CLONE_OPTS "--single-branch --recursive --depth=1" + -antigen-set-default ANTIGEN_SUBMODULE_OPTS "--recursive --depth=1" + + # Complain when a bundle is already installed. + -antigen-set-default _ANTIGEN_WARN_DUPLICATES true + + # Compatibility with oh-my-zsh themes. + -antigen-set-default _ANTIGEN_THEME_COMPAT true + + # Add default built-in extensions to load at start up + -antigen-set-default _ANTIGEN_BUILTIN_EXTENSIONS 'lock parallel defer cache' + + # Setup antigen's own completion. + if -antigen-interactive-mode; then + TRACE "Gonna create compdump file @ env-setup" COMPDUMP + autoload -Uz compinit + compinit -d "$ANTIGEN_COMPDUMP" + compdef _antigen antigen + else + (( $+functions[antigen-ext-init] )) && antigen-ext-init + fi +} +# Load a given bundle by sourcing it. +# +# The function also modifies fpath to add the bundle path. +# +# Usage +# -antigen-load "bundle-url" ["location"] ["make_local_clone"] ["btype"] +# +# Returns +# Integer. 0 if success 1 if an error ocurred. +-antigen-load () { + local bundle list + typeset -A bundle; bundle=($@) + + typeset -Ua list; list=() + local location="${bundle[dir]}/${bundle[loc]}" + + # Prioritize location when given. + if [[ -f "${location}" ]]; then + list=(${location}) + else + # Directory locations must be suffixed with slash + location="$location/" + + # Prioritize theme with antigen-theme + if [[ ${bundle[btype]} == "theme" ]]; then + list=(${location}*.zsh-theme(N[1])) + fi + + # Common frameworks + if [[ $#list == 0 ]]; then + # dot-plugin, init and functions support (omz, prezto) + # Support prezto function loading. See https://github.com/zsh-users/antigen/pull/428 + list=(${location}*.plugin.zsh(N[1]) ${location}init.zsh(N[1]) ${location}/functions(N[1])) + fi + + # Default to zsh and sh + if [[ $#list == 0 ]]; then + list=(${location}*.zsh(N) ${location}*.sh(N)) + fi + fi + + -antigen-load-env ${(kv)bundle} + + # If there is any sourceable try to load it + if ! -antigen-load-source "${list[@]}" && [[ ! -d ${location} ]]; then + return 1 + fi + + return 0 +} + +-antigen-load-env () { + typeset -A bundle; bundle=($@) + local location=${bundle[dir]}/${bundle[loc]} + + # Load to path if there is no sourceable + if [[ -d ${location} ]]; then + PATH="$PATH:${location:A}" + fpath+=("${location:A}") + return + fi + + PATH="$PATH:${location:A:h}" + fpath+=("${location:A:h}") +} + +-antigen-load-source () { + typeset -a list + list=($@) + local src match mbegin mend MATCH MBEGIN MEND + + # Return error when we're given an empty list + if [[ $#list == 0 ]]; then + return 1 + fi + + # Using a for rather than `source $list` as we need to check for zsh-themes + # In order to create antigen-compat file. This is only needed for interactive-mode + # theme switching, for static loading (cache) there is no need. + for src in $list; do + if [[ $_ANTIGEN_THEME_COMPAT == true && -f "$src" && "$src" == *.zsh-theme* ]]; then + local compat="${src:A}.antigen-compat" + echo "# Generated by Antigen. Do not edit!" >! "$compat" + cat $src | sed -Ee '/\{$/,/^\}/!{ + s/^local // + }' >>! "$compat" + src="$compat" + fi + + if ! source "$src" 2>/dev/null; then + return 1 + fi + done +} +# Usage: +# -antigen-parse-args output_assoc_arr +-antigen-parse-args () { + local argkey key value index=0 args + local match mbegin mend MATCH MBEGIN MEND + + local var=$1 + shift + + # Bundle spec arguments' default values. + #setopt XTRACE VERBOSE + builtin typeset -A args + args[url]="$ANTIGEN_DEFAULT_REPO_URL" + #unsetopt XTRACE VERBOSE + args[loc]=/ + args[make_local_clone]=true + args[btype]=plugin + #args[branch]= # commented out as it may cause assoc array kv mismatch + + while [[ $# -gt 0 ]]; do + argkey="${1%\=*}" + key="${argkey//--/}" + value="${1#*=}" + + case "$argkey" in + --url|--loc|--branch|--btype) + if [[ "$value" == "$argkey" ]]; then + printf "Required argument for '%s' not provided.\n" $key >&2 + else + args[$key]="$value" + fi + ;; + --no-local-clone) + args[make_local_clone]=false + ;; + --*) + printf "Unknown argument '%s'.\n" $key >&2 + ;; + *) + value=$key + case $index in + 0) + key=url + local domain="" + local url_path=$value + # Full url with protocol or ssh github url (github.com:org/repo) + if [[ "$value" =~ "://" || "$value" =~ ":" ]]; then + if [[ "$value" =~ [@.][^/:]+[:]?[0-9]*[:/]?(.*)@?$ ]]; then + url_path=$match[1] + domain=${value/$url_path/} + fi + fi + + if [[ "$url_path" =~ '@' ]]; then + args[branch]="${url_path#*@}" + value="$domain${url_path%@*}" + else + value="$domain$url_path" + fi + ;; + 1) key=loc ;; + esac + let index+=1 + args[$key]="$value" + ;; + esac + + shift + done + + # Check if url is just the plugin name. Super short syntax. + if [[ "${args[url]}" != */* ]]; then + case "$ANTIGEN_DEFAULT_REPO_URL" in + "$ANTIGEN_OMZ_REPO_URL") + args[loc]="plugins/${args[url]}" + ;; + "$ANTIGEN_PREZTO_REPO_URL") + args[loc]="modules/${args[url]}" + ;; + *) + args[loc]="${args[url]}" + ;; + esac + args[url]="$ANTIGEN_DEFAULT_REPO_URL" + fi + + # Resolve the url. + # Expand short github url syntax: `username/reponame`. + local url="${args[url]}" + if [[ $url != git://* && + $url != https://* && + $url != http://* && + $url != ssh://* && + $url != /* && + $url != *github.com:*/* + ]]; then + url="https://github.com/${url%.git}.git" + fi + args[url]="$url" + + # Ignore local clone if url given is not a git directory + if [[ ${args[url]} == /* && ! -d ${args[url]}/.git ]]; then + args[make_local_clone]=false + fi + + # Add the branch information to the url if we need to create a local clone. + # Format url in bundle-metadata format: url[|branch] + if [[ ! -z "${args[branch]}" && ${args[make_local_clone]} == true ]]; then + args[url]="${args[url]}|${args[branch]}" + fi + + # Add the theme extension to `loc`, if this is a theme, but only + # if it's especified, ie, --loc=theme-name, in case when it's not + # specified antige-load-list will look for *.zsh-theme files + if [[ ${args[btype]} == "theme" && + ${args[loc]} != "/" && ${args[loc]} != *.zsh-theme ]]; then + args[loc]="${args[loc]}.zsh-theme" + fi + + local name="${args[url]%|*}" + local branch="${args[branch]}" + + # Extract bundle name. + if [[ "$name" =~ '.*/(.*/.*).*$' ]]; then + name="${match[1]}" + fi + name="${name%.git*}" + + # Format bundle name with optional branch. + if [[ -n "${branch}" ]]; then + args[name]="${name}@${branch}" + else + args[name]="${name}" + fi + + # Format bundle path. + if [[ ${args[make_local_clone]} == true ]]; then + local bpath="$name" + # Suffix with branch/tag name + if [[ -n "$branch" ]]; then + # bpath is in the form of repo/name@version => repo/name-version + # Replace / with - in bundle branch. + local bbranch=${branch//\//-} + # If branch/tag is semver-like do replace * by x. + bbranch=${bbranch//\*/x} + bpath="${name}-${bbranch}" + fi + + bpath="$ANTIGEN_BUNDLES/$bpath" + args[dir]="${(qq)bpath}" + else + # if it's local then path is just the "url" argument, loc remains the same + args[dir]=${args[url]} + fi + + # Escape url and branch (may contain semver-like and pipe characters) + args[url]="${(qq)args[url]}" + if [[ -n "${args[branch]}" ]]; then + args[branch]="${(qq)args[branch]}" + fi + + # Escape bundle name (may contain semver-like characters) + args[name]="${(qq)args[name]}" + + eval "${var}=(${(kv)args})" + + return 0 +} +# Updates revert-info data with git hash. +# +# This does process only cloned bundles. +# +# Usage +# -antigen-revert-info +# +# Returns +# Nothing. Generates/updates $ADOTDIR/revert-info. +-antigen-revert-info() { + local url + # Update your bundles, i.e., `git pull` in all the plugin repos. + date >! $ADOTDIR/revert-info + + -antigen-get-cloned-bundles | while read url; do + local clone_dir="$(-antigen-get-clone-dir "$url")" + if [[ -d "$clone_dir" ]]; then + (echo -n "$clone_dir:" + \cd -q "$clone_dir" + git rev-parse HEAD) >> $ADOTDIR/revert-info + fi + done +} +-antigen-use-oh-my-zsh () { + typeset -g ZSH ZSH_CACHE_DIR + ANTIGEN_DEFAULT_REPO_URL=$ANTIGEN_OMZ_REPO_URL + if [[ -z "$ZSH" ]]; then + ZSH="$(-antigen-get-clone-dir "$ANTIGEN_DEFAULT_REPO_URL")" + fi + if [[ -z "$ZSH_CACHE_DIR" ]]; then + ZSH_CACHE_DIR="$ZSH/cache/" + fi + antigen-bundle --loc=lib +} +-antigen-use-prezto () { + ANTIGEN_DEFAULT_REPO_URL=$ANTIGEN_PREZTO_REPO_URL + antigen-bundle "$ANTIGEN_PREZTO_REPO_URL" +} +# Initialize completion +antigen-apply () { + LOG "Called antigen-apply" + + # Load the compinit module. This will readefine the `compdef` function to + # the one that actually initializes completions. + TRACE "Gonna create compdump file @ apply" COMPDUMP + autoload -Uz compinit + compinit -d "$ANTIGEN_COMPDUMP" + + # Apply all `compinit`s that have been deferred. + local cdef + for cdef in "${__deferred_compdefs[@]}"; do + compdef "$cdef" + done + + { zcompile "$ANTIGEN_COMPDUMP" } &! + + unset __deferred_compdefs +} +# Syntaxes +# antigen-bundle [=/] +# Keyword only arguments: +# branch - The branch of the repo to use for this bundle. +antigen-bundle () { + TRACE "Called antigen-bundle with $@" BUNDLE + if [[ -z "$1" ]]; then + printf "Antigen: Must provide a bundle url or name.\n" >&2 + return 1 + fi + + builtin typeset -A bundle; -antigen-parse-args 'bundle' ${=@} + if [[ -z ${bundle[btype]} ]]; then + bundle[btype]=bundle + fi + + local record="${bundle[url]} ${bundle[loc]} ${bundle[btype]} ${bundle[make_local_clone]}" + if [[ $_ANTIGEN_WARN_DUPLICATES == true && ! ${_ANTIGEN_BUNDLE_RECORD[(I)$record]} == 0 ]]; then + printf "Seems %s is already installed!\n" ${bundle[name]} + return 1 + fi + + # Clone bundle if we haven't done do already. + if [[ ! -d "${bundle[dir]}" ]]; then + if ! -antigen-bundle-install ${(kv)bundle}; then + return 1 + fi + fi + + # Load the plugin. + if ! -antigen-load ${(kv)bundle}; then + TRACE "-antigen-load failed to load ${bundle[name]}" BUNDLE + printf "Antigen: Failed to load %s.\n" ${bundle[btype]} >&2 + return 1 + fi + + # Only add it to the record if it could be installed and loaded. + _ANTIGEN_BUNDLE_RECORD+=("$record") +} + +# +# Usage: +# -antigen-bundle-install +# Returns: +# 1 if it fails to install bundle +-antigen-bundle-install () { + typeset -A bundle; bundle=($@) + + # Ensure a clone exists for this repo, if needed. + # Get the clone's directory as per the given repo url and branch. + local bpath="${bundle[dir]}" + # Clone if it doesn't already exist. + local start=$(date +'%s') + + printf "Installing %s... " "${bundle[name]}" + + if ! -antigen-ensure-repo "${bundle[url]}"; then + # Return immediately if there is an error cloning + TRACE "-antigen-bundle-instal failed to clone ${bundle[url]}" BUNDLE + printf "Error! Activate logging and try again.\n" >&2 + return 1 + fi + + local took=$(( $(date +'%s') - $start )) + printf "Done. Took %ds.\n" $took +} +antigen-bundles () { + # Bulk add many bundles at one go. Empty lines and lines starting with a `#` + # are ignored. Everything else is given to `antigen-bundle` as is, no + # quoting rules applied. + local line + setopt localoptions no_extended_glob # See https://github.com/zsh-users/antigen/issues/456 + grep '^[[:space:]]*[^[:space:]#]' | while read line; do + antigen-bundle ${=line%#*} + done +} +# Cleanup unused repositories. +antigen-cleanup () { + local force=false + if [[ $1 == --force ]]; then + force=true + fi + + if [[ ! -d "$ANTIGEN_BUNDLES" || -z "$(\ls -A "$ANTIGEN_BUNDLES")" ]]; then + echo "You don't have any bundles." + return 0 + fi + + # Find directores in ANTIGEN_BUNDLES, that are not in the bundles record. + typeset -a unused_clones clones + + local url record clone + for record in $(-antigen-get-cloned-bundles); do + url=${record% /*} + clones+=("$(-antigen-get-clone-dir $url)") + done + + for clone in $ANTIGEN_BUNDLES/*/*(/); do + if [[ $clones[(I)$clone] == 0 ]]; then + unused_clones+=($clone) + fi + done + + if [[ -z $unused_clones ]]; then + echo "You don't have any unidentified bundles." + return 0 + fi + + echo 'You have clones for the following repos, but are not used.' + echo "\n${(j:\n:)unused_clones}" + + if $force || (echo -n '\nDelete them all? [y/N] '; read -q); then + echo + echo + for clone in $unused_clones; do + echo -n "Deleting clone \"$clone\"..." + \rm -rf "$clone" + + echo ' done.' + done + else + echo + echo "Nothing deleted." + fi +} +antigen-help () { + antigen-version + + cat < [args] + +Commands: + apply Must be called in the zshrc after all calls to 'antigen bundle'. + bundle Install and load a plugin. + cache-gen Generate Antigen's cache with currently loaded bundles. + cleanup Remove clones of repos not used by any loaded plugins. + init Use caching to quickly load bundles. + list List currently loaded plugins. + purge Remove a bundle from the filesystem. + reset Clean the generated cache. + restore Restore plugin state from a snapshot file. + revert Revert plugins to their state prior to the last time 'antigen + update' was run. + selfupdate Update antigen. + snapshot Create a snapshot of all active plugin repos and save it to a + snapshot file. + update Update plugins. + use Load a supported zsh pre-packaged framework. + +For further details and complete documentation, visit the project's page at +'http://antigen.sharats.me'. +EOF +} +# Antigen command to load antigen configuration +# +# This method is slighlty more performing than using various antigen-* methods. +# +# Usage +# Referencing an antigen configuration file: +# +# antigen-init "/path/to/antigenrc" +# +# or using HEREDOCS: +# +# antigen-init <&2 + return 1 + fi + fi + + # Otherwise we expect it to be a heredoc + grep '^[[:space:]]*[^[:space:]#]' | while read -r line; do + eval $line + done +} +# List instaled bundles either in long (record), short or simple format. +# +# Usage +# antigen-list [--short|--long|--simple] +# +# Returns +# List of bundles +antigen-list () { + local format=$1 + + # List all currently installed bundles. + if [[ -z $_ANTIGEN_BUNDLE_RECORD ]]; then + echo "You don't have any bundles." >&2 + return 1 + fi + + -antigen-get-bundles $format +} +# Remove a bundle from filesystem +# +# Usage +# antigen-purge example/bundle [--force] +# +# Returns +# Nothing. Removes bundle from filesystem. +antigen-purge () { + local bundle=$1 + local force=$2 + + if [[ $# -eq 0 ]]; then + echo "Antigen: Missing argument." >&2 + return 1 + fi + + if -antigen-purge-bundle $bundle $force; then + antigen-reset + else + return $? + fi + + return 0 +} + +# Remove a bundle from filesystem +# +# Usage +# antigen-purge example/bundle [--force] +# +# Returns +# Nothing. Removes bundle from filesystem. +-antigen-purge-bundle () { + local bundle=$1 + local force=$2 + local clone_dir="" + + local record="" + local url="" + local make_local_clone="" + + if [[ $# -eq 0 ]]; then + echo "Antigen: Missing argument." >&2 + return 1 + fi + + # local keyword doesn't work on zsh <= 5.0.0 + record=$(-antigen-find-record $bundle) + + if [[ ! -n "$record" ]]; then + echo "Bundle not found in record. Try 'antigen bundle $bundle' first." >&2 + return 1 + fi + + url="$(echo "$record" | cut -d' ' -f1)" + make_local_clone=$(echo "$record" | cut -d' ' -f4) + + if [[ $make_local_clone == "false" ]]; then + echo "Bundle has no local clone. Will not be removed." >&2 + return 1 + fi + + clone_dir=$(-antigen-get-clone-dir "$url") + if [[ $force == "--force" ]] || read -q "?Remove '$clone_dir'? (y/n) "; then + # Need empty line after read -q + [[ ! -n $force ]] && echo "" || echo "Removing '$clone_dir'."; + rm -rf "$clone_dir" + return $? + fi + + return 1 +} +# Removes cache payload and metadata if available +# +# Usage +# antigen-reset +# +# Returns +# Nothing +antigen-reset () { + [[ -f "$ANTIGEN_CACHE" ]] && rm -f "$ANTIGEN_CACHE" "$ANTIGEN_CACHE.zwc" 1> /dev/null + [[ -f "$ANTIGEN_RSRC" ]] && rm -f "$ANTIGEN_RSRC" 1> /dev/null + [[ -f "$ANTIGEN_COMPDUMP" ]] && rm -f "$ANTIGEN_COMPDUMP" "$ANTIGEN_COMPDUMP.zwc" 1> /dev/null + [[ -f "$ANTIGEN_LOCK" ]] && rm -f "$ANTIGEN_LOCK" 1> /dev/null + echo 'Done. Please open a new shell to see the changes.' +} +antigen-restore () { + local line + if [[ $# == 0 ]]; then + echo 'Please provide a snapshot file to restore from.' >&2 + return 1 + fi + + local snapshot_file="$1" + + # TODO: Before doing anything with the snapshot file, verify its checksum. + # If it fails, notify this to the user and confirm if restore should + # proceed. + + echo -n "Restoring from $snapshot_file..." + + sed -n '1!p' "$snapshot_file" | + while read line; do + local version_hash="${line%% *}" + local url="${line##* }" + local clone_dir="$(-antigen-get-clone-dir "$url")" + + if [[ ! -d $clone_dir ]]; then + git clone "$url" "$clone_dir" &> /dev/null + fi + + (\cd -q "$clone_dir" && git checkout $version_hash) &> /dev/null + done + + echo ' done.' + echo 'Please open a new shell to get the restored changes.' +} +# Reads $ADORDIR/revert-info and restores bundles' revision +antigen-revert () { + local line + if [[ -f $ADOTDIR/revert-info ]]; then + cat $ADOTDIR/revert-info | sed -n '1!p' | while read line; do + local dir="$(echo "$line" | cut -d: -f1)" + git --git-dir="$dir/.git" --work-tree="$dir" \ + checkout "$(echo "$line" | cut -d: -f2)" 2> /dev/null + done + + echo "Reverted to state before running -update on $( + cat $ADOTDIR/revert-info | sed -n '1p')." + + else + echo 'No revert information available. Cannot revert.' >&2 + return 1 + fi +} +# Update (with `git pull`) antigen itself. +# TODO: Once update is finished, show a summary of the new commits, as a kind of +# "what's new" message. +antigen-selfupdate () { + (\cd -q $_ANTIGEN_INSTALL_DIR + if [[ ! ( -d .git || -f .git ) ]]; then + echo "Your copy of antigen doesn't appear to be a git clone. " \ + "The 'selfupdate' command cannot work in this case." + return 1 + fi + local head="$(git rev-parse --abbrev-ref HEAD)" + if [[ $head == "HEAD" ]]; then + # If current head is detached HEAD, checkout to master branch. + git checkout master + fi + git pull + + # TODO Should be transparently hooked by zcache + antigen-reset &>> /dev/null + ) +} +antigen-snapshot () { + local snapshot_file="${1:-antigen-shapshot}" + local urls url dir version_hash snapshot_content + local -a bundles + + # The snapshot content lines are pairs of repo-url and git version hash, in + # the form: + # + urls=$(-antigen-echo-record | awk '$4 == "true" {print $1}' | sort -u) + for url in ${(f)urls}; do + dir="$(-antigen-get-clone-dir "$url")" + version_hash="$(\cd -q "$dir" && git rev-parse HEAD)" + bundles+=("$version_hash $url"); + done + snapshot_content=${(j:\n:)bundles} + + { + # The first line in the snapshot file is for metadata, in the form: + # key='value'; key='value'; key='value'; + # Where `key`s are valid shell variable names. + + # Snapshot version. Has no relation to antigen version. If the snapshot + # file format changes, this number can be incremented. + echo -n "version='1';" + + # Snapshot creation date+time. + echo -n " created_on='$(date)';" + + # Add a checksum with the md5 checksum of all the snapshot lines. + chksum() { (md5sum; test $? = 127 && md5) 2>/dev/null | cut -d' ' -f1 } + local checksum="$(echo "$snapshot_content" | chksum)" + unset -f chksum; + echo -n " checksum='${checksum%% *}';" + + # A newline after the metadata and then the snapshot lines. + echo "\n$snapshot_content" + + } > "$snapshot_file" +} +# Loads a given theme. +# +# Shares the same syntax as antigen-bundle command. +# +# Usage +# antigen-theme zsh/theme[.zsh-theme] +# +# Returns +# 0 if everything was succesfully +antigen-theme () { + local name=$1 result=0 record + local match mbegin mend MATCH MBEGIN MEND + + if [[ -z "$1" ]]; then + printf "Antigen: Must provide a theme url or name.\n" >&2 + return 1 + fi + + -antigen-theme-reset-hooks + + record=$(-antigen-find-record "theme") + if [[ "$1" != */* && "$1" != --* ]]; then + # The first argument is just a name of the plugin, to be picked up from + # the default repo. + antigen-bundle --loc=themes/$name --btype=theme + + else + antigen-bundle "$@" --btype=theme + + fi + result=$? + + # Remove a theme from the record if the following conditions apply: + # - there was no error in bundling the given theme + # - there is a theme registered + # - registered theme is not the same as the current one + if [[ $result == 0 && -n $record ]]; then + # http://zsh-workers.zsh.narkive.com/QwfCWpW8/what-s-wrong-with-this-expression + if [[ "$record" =~ "$@" ]]; then + return $result + else + _ANTIGEN_BUNDLE_RECORD[$_ANTIGEN_BUNDLE_RECORD[(I)$record]]=() + fi + fi + + return $result +} + +-antigen-theme-reset-hooks () { + # This is only needed on interactive mode + autoload -U add-zsh-hook is-at-least + local hook + + # Clear out prompts + PROMPT="" + if [[ -n $RPROMPT ]]; then + RPROMPT="" + fi + + for hook in chpwd precmd preexec periodic; do + add-zsh-hook -D "${hook}" "prompt_*" + # common in omz themes + add-zsh-hook -D "${hook}" "*_${hook}" + add-zsh-hook -d "${hook}" "vcs_info" + done +} +# Updates the bundles or a single bundle. +# +# Usage +# antigen-update [example/bundle] +# +# Returns +# Nothing. Performs a `git pull`. +antigen-update () { + local bundle=$1 url + + # Clear log + :> $ANTIGEN_LOG + + # Update revert-info data + -antigen-revert-info + + # If no argument is given we update all bundles + if [[ $# -eq 0 ]]; then + # Here we're ignoring all non cloned bundles (ie, --no-local-clone) + -antigen-get-cloned-bundles | while read url; do + -antigen-update-bundle $url + done + # TODO next minor version + # antigen-reset + else + if -antigen-update-bundle $bundle; then + # TODO next minor version + # antigen-reset + else + return $? + fi + fi +} + +# Updates a bundle performing a `git pull`. +# +# Usage +# -antigen-update-bundle example/bundle +# +# Returns +# Nothing. Performs a `git pull`. +-antigen-update-bundle () { + local bundle="$1" + local record="" + local url="" + local make_local_clone="" + local start=$(date +'%s') + + if [[ $# -eq 0 ]]; then + printf "Antigen: Missing argument.\n" >&2 + return 1 + fi + + record=$(-antigen-find-record $bundle) + if [[ ! -n "$record" ]]; then + printf "Bundle not found in record. Try 'antigen bundle %s' first.\n" $bundle >&2 + return 1 + fi + + url="$(echo "$record" | cut -d' ' -f1)" + make_local_clone=$(echo "$record" | cut -d' ' -f4) + + local branch="master" + if [[ $url == *\|* ]]; then + branch="$(-antigen-parse-branch ${url%|*} ${url#*|})" + fi + + printf "Updating %s... " $(-antigen-bundle-short-name "$url" "$branch") + + if [[ $make_local_clone == "false" ]]; then + printf "Bundle has no local clone. Will not be updated.\n" >&2 + return 1 + fi + + # update=true verbose=false + if ! -antigen-ensure-repo "$url" true false; then + printf "Error! Activate logging and try again.\n" >&2 + return 1 + fi + + local took=$(( $(date +'%s') - $start )) + printf "Done. Took %ds.\n" $took +} +antigen-use () { + if [[ $1 == oh-my-zsh ]]; then + -antigen-use-oh-my-zsh + elif [[ $1 == prezto ]]; then + -antigen-use-prezto + elif [[ $1 != "" ]]; then + ANTIGEN_DEFAULT_REPO_URL=$1 + antigen-bundle $@ + else + echo 'Usage: antigen-use ' >&2 + echo 'Where is any one of the following:' >&2 + echo ' * oh-my-zsh' >&2 + echo ' * prezto' >&2 + echo ' is the full url.' >&2 + return 1 + fi +} +antigen-version () { + local version="v2.2.2" + local extensions revision="" + if [[ -d $_ANTIGEN_INSTALL_DIR/.git ]]; then + revision=" ($(git --git-dir=$_ANTIGEN_INSTALL_DIR/.git rev-parse --short '@'))" + fi + + printf "Antigen %s%s\n" $version $revision + if (( $+functions[antigen-ext] )); then + typeset -a extensions; extensions=($(antigen-ext-list)) + if [[ $#extensions -gt 0 ]]; then + printf "Extensions loaded: %s\n" ${(j:, :)extensions} + fi + fi +} +typeset -Ag _ANTIGEN_HOOKS; _ANTIGEN_HOOKS=() +typeset -Ag _ANTIGEN_HOOKS_META; _ANTIGEN_HOOKS_META=() +typeset -g _ANTIGEN_HOOK_PREFIX="-antigen-hook-" +typeset -g _ANTIGEN_EXTENSIONS; _ANTIGEN_EXTENSIONS=() + +# -antigen-add-hook antigen-apply antigen-apply-hook replace +# - Replaces hooked function with hook, do not call hooked function +# - Return -1 to stop calling further hooks +# -antigen-add-hook antigen-apply antigen-apply-hook pre (pre-call) +# - By default it will call hooked function +# -antigen-add-hook antigen-pply antigen-apply-hook post (post-call) +# - Calls antigen-apply and then calls hook function +# Usage: +# -antigen-add-hook antigen-apply antigen-apply-hook ["replace"|"pre"|"post"] ["once"|"repeat"] +antigen-add-hook () { + local target="$1" hook="$2" type="$3" mode="${4:-repeat}" + + if (( ! $+functions[$target] )); then + printf "Antigen: Function %s doesn't exist.\n" $target + return 1 + fi + + if (( ! $+functions[$hook] )); then + printf "Antigen: Function %s doesn't exist.\n" $hook + return 1 + fi + + if [[ "${_ANTIGEN_HOOKS[$target]}" == "" ]]; then + _ANTIGEN_HOOKS[$target]="${hook}" + else + _ANTIGEN_HOOKS[$target]="${_ANTIGEN_HOOKS[$target]}:${hook}" + fi + + _ANTIGEN_HOOKS_META[$hook]="target $target type $type mode $mode called 0" + + # Do shadow for this function if there is none already + local hook_function="${_ANTIGEN_HOOK_PREFIX}$target" + if (( ! $+functions[$hook_function] )); then + # Preserve hooked function + eval "function ${_ANTIGEN_HOOK_PREFIX}$(functions -- $target)" + + # Create hook, call hook-handler to further process hook functions + eval "function $target () { + noglob -antigen-hook-handler $target \$@ + return \$? + }" + fi + + return 0 +} + +# Private function to handle multiple hooks in a central point. +-antigen-hook-handler () { + local target="$1" args hook called + local hooks meta + shift + typeset -a args; args=(${@}) + + typeset -a pre_hooks replace_hooks post_hooks; + typeset -a hooks; hooks=(${(s|:|)_ANTIGEN_HOOKS[$target]}) + + typeset -A meta; + for hook in $hooks; do + meta=(${(s: :)_ANTIGEN_HOOKS_META[$hook]}) + if [[ ${meta[mode]} == "once" && ${meta[called]} == 1 ]]; then + WARN "Ignoring hook due to mode ${meta[mode]}: $hook" + continue + fi + + let called=${meta[called]}+1 + meta[called]=$called + _ANTIGEN_HOOKS_META[$hook]="${(kv)meta}" + WARN "Updated meta: "${(kv)meta} + + case "${meta[type]}" in + "pre") + pre_hooks+=($hook) + ;; + "replace") + replace_hooks+=($hook) + ;; + "post") + post_hooks+=($hook) + ;; + esac + done + + WARN "Processing hooks: ${hooks}" + + for hook in $pre_hooks; do + WARN "Pre hook:" $hook $args + noglob $hook $args + [[ $? == -1 ]] && WARN "$hook shortcircuited" && return $ret + done + + # A replace hook will return inmediately + local replace_hook=0 ret=0 + for hook in $replace_hooks; do + replace_hook=1 + # Should not be needed if `antigen-remove-hook` removed unneeded hooks. + if (( $+functions[$hook] )); then + WARN "Replace hook:" $hook $args + noglob $hook $args + [[ $? == -1 ]] && WARN "$hook shortcircuited" && return $ret + fi + done + + if [[ $replace_hook == 0 ]]; then + WARN "${_ANTIGEN_HOOK_PREFIX}$target $args" + noglob ${_ANTIGEN_HOOK_PREFIX}$target $args + ret=$? + else + WARN "Replaced hooked function." + fi + + for hook in $post_hooks; do + WARN "Post hook:" $hook $args + noglob $hook $args + [[ $? == -1 ]] && WARN "$hook shortcircuited" && return $ret + done + + LOG "Return from hook ${target} with ${ret}" + + return $ret +} + +# Usage: +# -antigen-remove-hook antigen-apply-hook +antigen-remove-hook () { + local hook="$1" + typeset -A meta; meta=(${(s: :)_ANTIGEN_HOOKS_META[$hook]}) + local target="${meta[target]}" + local -a hooks; hooks=(${(s|:|)_ANTIGEN_HOOKS[$target]}) + + # Remove registered hook + if [[ $#hooks > 0 ]]; then + hooks[$hooks[(I)$hook]]=() + fi + _ANTIGEN_HOOKS[${target}]="${(j|:|)hooks}" + + if [[ $#hooks == 0 ]]; then + # Destroy base hook + eval "function $(functions -- ${_ANTIGEN_HOOK_PREFIX}$target | sed s/${_ANTIGEN_HOOK_PREFIX}//)" + if (( $+functions[${_ANTIGEN_HOOK_PREFIX}$target] )); then + unfunction -- "${_ANTIGEN_HOOK_PREFIX}$target" + fi + fi + + unfunction -- $hook 2> /dev/null +} + +# Remove all defined hooks. +-antigen-reset-hooks () { + local target + + for target in ${(k)_ANTIGEN_HOOKS}; do + # Release all hooked functions + eval "function $(functions -- ${_ANTIGEN_HOOK_PREFIX}$target | sed s/${_ANTIGEN_HOOK_PREFIX}//)" + unfunction -- "${_ANTIGEN_HOOK_PREFIX}$target" 2> /dev/null + done + + _ANTIGEN_HOOKS=() + _ANTIGEN_HOOKS_META=() + _ANTIGEN_EXTENSIONS=() +} + +# Initializes an extension +# Usage: +# antigen-ext ext-name +antigen-ext () { + local ext=$1 + local func="-antigen-$ext-init" + if (( $+functions[$func] && $_ANTIGEN_EXTENSIONS[(I)$ext] == 0 )); then + eval $func + local ret=$? + WARN "$func return code was $ret" + if (( $ret == 0 )); then + LOG "LOADED EXTENSION $ext" EXT + -antigen-$ext-execute && _ANTIGEN_EXTENSIONS+=($ext) + else + WARN "IGNORING EXTENSION $func" EXT + return 1 + fi + + else + printf "Antigen: No extension defined or already loaded: %s\n" $func >&2 + return 1 + fi +} + +# List installed extensions +# Usage: +# antigen ext-list +antigen-ext-list () { + echo $_ANTIGEN_EXTENSIONS +} + +# Initializes built-in extensions +# Usage: +# antigen-ext-init +antigen-ext-init () { + # Initialize extensions. unless in interactive mode. + local ext + for ext in ${(s/ /)_ANTIGEN_BUILTIN_EXTENSIONS}; do + # Check if extension is loaded before intializing it + (( $+functions[-antigen-$ext-init] )) && antigen-ext $ext + done +} +# Initialize defer lib +-antigen-defer-init () { + typeset -ga _DEFERRED_BUNDLE; _DEFERRED_BUNDLE=() + if -antigen-interactive-mode; then + return 1 + fi +} + +-antigen-defer-execute () { + # Hooks antigen-bundle in order to defer its execution. + antigen-bundle-defer () { + _DEFERRED_BUNDLE+=("${(j: :)${@}}") + return -1 # Stop right there + } + antigen-add-hook antigen-bundle antigen-bundle-defer replace + + # Hooks antigen-apply in order to release hooked functions + antigen-apply-defer () { + WARN "Defer pre-apply" DEFER PRE-APPLY + antigen-remove-hook antigen-bundle-defer + + # Process all deferred bundles. + local bundle + for bundle in ${_DEFERRED_BUNDLE[@]}; do + LOG "Processing deferred bundle: ${bundle}" DEFER + antigen-bundle $bundle + done + + unset _DEFERRED_BUNDLE + } + antigen-add-hook antigen-apply antigen-apply-defer pre once +} +# Initialize lock lib +-antigen-lock-init () { + # Default lock path. + -antigen-set-default ANTIGEN_LOCK $ADOTDIR/.lock + typeset -g _ANTIGEN_LOCK_PROCESS=false + + # Use env variable to determine if we should load this extension + -antigen-set-default ANTIGEN_MUTEX true + # Set ANTIGEN_MUTEX to false to avoid loading this extension + if [[ $ANTIGEN_MUTEX == true ]]; then + return 0; + fi + + # Do not use mutex + return 1; +} + +-antigen-lock-execute () { + # Hook antigen command in order to check/create a lock file. + # This hook is only run once then releases itself. + antigen-lock () { + LOG "antigen-lock called" + # If there is a lock set up then we won't process anything. + if [[ -f $ANTIGEN_LOCK ]]; then + # Set up flag do the message is not repeated for each antigen-* command + [[ $_ANTIGEN_LOCK_PROCESS == false ]] && printf "Antigen: Another process in running.\n" + _ANTIGEN_LOCK_PROCESS=true + # Do not further process hooks. For this hook to properly work it + # should be registered first. + return -1 + fi + + WARN "Creating antigen-lock file at $ANTIGEN_LOCK" + touch $ANTIGEN_LOCK + } + antigen-add-hook antigen antigen-lock pre once + + # Hook antigen-apply in order to release .lock file. + antigen-apply-lock () { + WARN "Freeing antigen-lock file at $ANTIGEN_LOCK" + unset _ANTIGEN_LOCK_PROCESS + rm -f $ANTIGEN_LOCK &> /dev/null + } + antigen-add-hook antigen-apply antigen-apply-lock post once +} +# Initialize parallel lib +-antigen-parallel-init () { + WARN "Init parallel extension" PARALLEL + typeset -ga _PARALLEL_BUNDLE; _PARALLEL_BUNDLE=() + if -antigen-interactive-mode; then + return 1 + fi +} + +-antigen-parallel-execute() { + WARN "Exec parallel extension" PARALLEL + # Install bundles in parallel + antigen-bundle-parallel-execute () { + WARN "Parallel antigen-bundle-parallel-execute" PARALLEL + typeset -a pids; pids=() + local args pid + + WARN "Gonna install in parallel ${#_PARALLEL_BUNDLE} bundles." PARALLEL + # Do ensure-repo in parallel + WARN "${_PARALLEL_BUNDLE}" PARALLEL + typeset -Ua repositories # Used to keep track of cloned repositories to avoid + # trying to clone it multiple times. + for args in ${_PARALLEL_BUNDLE}; do + typeset -A bundle; -antigen-parse-args 'bundle' ${=args} + + if [[ ! -d ${bundle[dir]} && $repositories[(I)${bundle[url]}] == 0 ]]; then + WARN "Install in parallel ${bundle[name]}." PARALLEL + echo "Installing ${bundle[name]}!..." + # $bundle[url]'s format is "url|branch" as to create "$ANTIGEN_BUNDLES/bundle/name-branch", + # this way you may require multiple branches from the same repository. + -antigen-ensure-repo "${bundle[url]}" > /dev/null &! + pids+=($!) + else + WARN "Bundle ${bundle[name]} already cloned locally." PARALLEL + fi + + repositories+=(${bundle[url]}) + done + + # Wait for all background processes to end + while [[ $#pids > 0 ]]; do + for pid in $pids; do + # `ps` may diplay an error message such "Signal 18 (CONT) caught by ps + # (procps-ng version 3.3.9).", see https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=732410 + if [[ $(ps -o pid= -p $pid 2>/dev/null) == "" ]]; then + pids[$pids[(I)$pid]]=() + fi + done + sleep .5 + done + + builtin local bundle &> /dev/null + for bundle in ${_PARALLEL_BUNDLE[@]}; do + antigen-bundle $bundle + done + + + WARN "Parallel install done" PARALLEL + } + + # Hooks antigen-apply in order to release hooked functions + antigen-apply-parallel () { + WARN "Parallel pre-apply" PARALLEL PRE-APPLY + #antigen-remove-hook antigen-pre-apply-parallel + # Hooks antigen-bundle in order to parallel its execution. + antigen-bundle-parallel () { + TRACE "antigen-bundle-parallel: $@" PARALLEL + _PARALLEL_BUNDLE+=("${(j: :)${@}}") + } + antigen-add-hook antigen-bundle antigen-bundle-parallel replace + } + antigen-add-hook antigen-apply antigen-apply-parallel pre once + + antigen-apply-parallel-execute () { + WARN "Parallel replace-apply" PARALLEL REPLACE-APPLY + antigen-remove-hook antigen-bundle-parallel + # Process all parallel bundles. + antigen-bundle-parallel-execute + + unset _PARALLEL_BUNDLE + antigen-remove-hook antigen-apply-parallel-execute + antigen-apply + } + antigen-add-hook antigen-apply antigen-apply-parallel-execute replace once +} +typeset -ga _ZCACHE_BUNDLE_SOURCE _ZCACHE_CAPTURE_BUNDLE +typeset -g _ZCACHE_CAPTURE_PREFIX + +# Generates cache from listed bundles. +# +# Iterates over _ANTIGEN_BUNDLE_RECORD and join all needed sources into one, +# if this is done through -antigen-load-list. +# Result is stored in ANTIGEN_CACHE. +# +# _ANTIGEN_BUNDLE_RECORD and fpath is stored in cache. +# +# Usage +# -zcache-generate-cache +# +# Returns +# Nothing. Generates ANTIGEN_CACHE +-antigen-cache-generate () { + local -aU _fpath _PATH _sources + local record + + LOG "Gonna generate cache for $_ZCACHE_BUNDLE_SOURCE" + for record in $_ZCACHE_BUNDLE_SOURCE; do + record=${record:A} + # LOG "Caching $record" + if [[ -f $record ]]; then + # Adding $'\n' as a suffix as j:\n: doesn't work inside a heredoc. + if [[ $_ANTIGEN_THEME_COMPAT == true && "$record" == *.zsh-theme* ]]; then + local compat="${record:A}.antigen-compat" + echo "# Generated by Antigen. Do not edit!" >! "$compat" + cat $record | sed -Ee '/\{$/,/^\}/!{ + s/^local // + }' >>! "$compat" + record="$compat" + fi + _sources+=("source '${record}';"$'\n') + elif [[ -d $record ]]; then + _PATH+=("${record}") + _fpath+=("${record}") + fi + done + +cat > $ANTIGEN_CACHE <! "$ANTIGEN_RSRC" + for rsrc in $ANTIGEN_CHECK_FILES; do + zcompile $rsrc + done + } &! + + return true +} + +# Initializes caching mechanism. +# +# Hooks `antigen-bundle` and `antigen-apply` in order to defer bundle install +# and load. All bundles are loaded from generated cache rather than dynamically +# as these are bundled. +# +# Usage +# -antigen-cache-init +# Returns +# Nothing +-antigen-cache-init () { + if -antigen-interactive-mode; then + return 1 + fi + + _ZCACHE_CAPTURE_PREFIX=${_ZCACHE_CAPTURE_PREFIX:-"--zcache-"} + _ZCACHE_BUNDLE_SOURCE=(); _ZCACHE_CAPTURE_BUNDLE=() + + # Cache auto config files to check for changes (.zshrc, .antigenrc etc) + -antigen-set-default ANTIGEN_AUTO_CONFIG true + + # Default cache path. + -antigen-set-default ANTIGEN_CACHE $ADOTDIR/init.zsh + -antigen-set-default ANTIGEN_RSRC $ADOTDIR/.resources + if [[ $ANTIGEN_CACHE == false ]]; then + return 1 + fi + + return 0 +} + +-antigen-cache-execute () { + # Main function. Deferred antigen-apply. + antigen-apply-cached () { + # TRACE "APPLYING CACHE" EXT + # Auto determine check_files + # There always should be 5 steps from original source as the correct way is to use + # `antigen` wrapper not `antigen-apply` directly and it's called by an extension. + LOG "TRACE: ${funcfiletrace}" + if [[ $ANTIGEN_AUTO_CONFIG == true && $#ANTIGEN_CHECK_FILES -eq 0 ]]; then + ANTIGEN_CHECK_FILES+=(~/.zshrc) + if [[ $#funcfiletrace -ge 6 ]]; then + ANTIGEN_CHECK_FILES+=("${${funcfiletrace[6]%:*}##* }") + fi + fi + + # Generate and compile cache + -antigen-cache-generate + [[ -f "$ANTIGEN_CACHE" ]] && source "$ANTIGEN_CACHE"; + + # Commented out in order to have a working `cache-gen` command + #unset _ZCACHE_BUNDLE_SOURCE + unset _ZCACHE_CAPTURE_BUNDLE _ZCACHE_CAPTURE_FUNCTIONS + + # Release all hooked functions + antigen-remove-hook -antigen-load-env-cached + antigen-remove-hook -antigen-load-source-cached + antigen-remove-hook antigen-bundle-cached + } + + antigen-add-hook antigen-apply antigen-apply-cached post once + + # Defer antigen-bundle. + antigen-bundle-cached () { + _ZCACHE_CAPTURE_BUNDLE+=("${(j: :)${@}}") + } + antigen-add-hook antigen-bundle antigen-bundle-cached pre + + # Defer loading. + -antigen-load-env-cached () { + local bundle + typeset -A bundle; bundle=($@) + local location=${bundle[dir]}/${bundle[loc]} + + # Load to path if there is no sourceable + if [[ ${bundle[loc]} == "/" ]]; then + _ZCACHE_BUNDLE_SOURCE+=("${location}") + return + fi + + _ZCACHE_BUNDLE_SOURCE+=("${location}") + } + antigen-add-hook -antigen-load-env -antigen-load-env-cached replace + + # Defer sourcing. + -antigen-load-source-cached () { + _ZCACHE_BUNDLE_SOURCE+=($@) + } + antigen-add-hook -antigen-load-source -antigen-load-source-cached replace + + return 0 +} + +# Generate static-cache file at $ANTIGEN_CACHE using currently loaded +# bundles from $_ANTIGEN_BUNDLE_RECORD +# +# Usage +# antigen-cache-gen +# +# Returns +# Nothing +antigen-cache-gen () { + -antigen-cache-generate +} +#compdef _antigen +# Setup antigen's autocompletion +_antigen () { + local -a _1st_arguments + _1st_arguments=( + 'apply:Load all bundle completions' + 'bundle:Install and load the given plugin' + 'bundles:Bulk define bundles' + 'cleanup:Clean up the clones of repos which are not used by any bundles currently loaded' + 'cache-gen:Generate cache' + 'init:Load Antigen configuration from file' + 'list:List out the currently loaded bundles' + 'purge:Remove a cloned bundle from filesystem' + 'reset:Clears cache' + 'restore:Restore the bundles state as specified in the snapshot' + 'revert:Revert the state of all bundles to how they were before the last antigen update' + 'selfupdate:Update antigen itself' + 'snapshot:Create a snapshot of all the active clones' + 'theme:Switch the prompt theme' + 'update:Update all bundles' + 'use:Load any (supported) zsh pre-packaged framework' + ); + + _1st_arguments+=( + 'help:Show this message' + 'version:Display Antigen version' + ) + + __bundle() { + _arguments \ + '--loc[Path to the location ]' \ + '--url[Path to the repository ]' \ + '--branch[Git branch name]' \ + '--no-local-clone[Do not create a clone]' + } + __list() { + _arguments \ + '--simple[Show only bundle name]' \ + '--short[Show only bundle name and branch]' \ + '--long[Show bundle records]' + } + + + __cleanup() { + _arguments \ + '--force[Do not ask for confirmation]' + } + + _arguments '*:: :->command' + + if (( CURRENT == 1 )); then + _describe -t commands "antigen command" _1st_arguments + return + fi + + local -a _command_args + case "$words[1]" in + bundle) + __bundle + ;; + use) + compadd "$@" "oh-my-zsh" "prezto" + ;; + cleanup) + __cleanup + ;; + (update|purge) + compadd $(type -f \-antigen-get-bundles &> /dev/null || antigen &> /dev/null; -antigen-get-bundles --simple 2> /dev/null) + ;; + theme) + compadd $(type -f \-antigen-get-themes &> /dev/null || antigen &> /dev/null; -antigen-get-themes 2> /dev/null) + ;; + list) + __list + ;; + esac +} +zmodload zsh/datetime +ANTIGEN_DEBUG_LOG=${ANTIGEN_DEBUG_LOG:-${ADOTDIR:-$HOME/.antigen}/debug.log} +LOG () { + local PREFIX="[LOG][${EPOCHREALTIME}]" + echo "${PREFIX} ${funcfiletrace[1]}\n${PREFIX} $@" >> $ANTIGEN_DEBUG_LOG +} + +ERR () { + local PREFIX="[ERR][${EPOCHREALTIME}]" + echo "${PREFIX} ${funcfiletrace[1]}\n${PREFIX} $@" >> $ANTIGEN_DEBUG_LOG +} + +WARN () { + local PREFIX="[WRN][${EPOCHREALTIME}]" + echo "${PREFIX} ${funcfiletrace[1]}\n${PREFIX} $@" >> $ANTIGEN_DEBUG_LOG +} + +TRACE () { + local PREFIX="[TRA][${EPOCHREALTIME}]" + echo "${PREFIX} ${funcfiletrace[1]}\n${PREFIX} $@\n${PREFIX} ${(j:\n:)funcstack}" >> $ANTIGEN_DEBUG_LOG +} +-antigen-env-setup diff --git a/sysutils/consul/Bastillefile b/sysutils/consul/Bastillefile new file mode 100644 index 0000000..b5ff1f4 --- /dev/null +++ b/sysutils/consul/Bastillefile @@ -0,0 +1,3 @@ +PKG consul +SYSRC consul_enable=YES +SERVICE consul start diff --git a/sysutils/consul/LICENSE b/sysutils/consul/LICENSE new file mode 100644 index 0000000..0f33c9f --- /dev/null +++ b/sysutils/consul/LICENSE @@ -0,0 +1,29 @@ +BSD 3-Clause License + +Copyright (c) 2019-2021, Christer Edwards +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/sysutils/consul/README.md b/sysutils/consul/README.md new file mode 100644 index 0000000..3b26e66 --- /dev/null +++ b/sysutils/consul/README.md @@ -0,0 +1,15 @@ +## Status +[![pipeline status](https://gitlab.com/bastillebsd-templates/consul/badges/master/pipeline.svg)](https://gitlab.com/bastillebsd-templates/consul/commits/master) + +# consul +Bastille template to bootstrap consul + +## Bootstrap +```shell +bastille bootstrap https://gitlab.com/bastillebsd-templates/consul +``` + +## Usage +```shell +bastille template TARGET bastillebsd-templates/consul +``` diff --git a/sysutils/salt-master/LICENSE b/sysutils/salt-master/LICENSE new file mode 100644 index 0000000..67f00d2 --- /dev/null +++ b/sysutils/salt-master/LICENSE @@ -0,0 +1,29 @@ +BSD 3-Clause License + +Copyright (c) 2019-2020, Christer Edwards +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/sysutils/salt-master/PKG b/sysutils/salt-master/PKG new file mode 100644 index 0000000..f5d4fa4 --- /dev/null +++ b/sysutils/salt-master/PKG @@ -0,0 +1 @@ +py37-salt diff --git a/sysutils/salt-master/README.md b/sysutils/salt-master/README.md new file mode 100644 index 0000000..5e78ed1 --- /dev/null +++ b/sysutils/salt-master/README.md @@ -0,0 +1,27 @@ +# salt-master +Bastille template to bootstrap Salt Master + +## Status +[![pipeline status](https://gitlab.com/bastillebsd-templates/salt-master/badges/master/pipeline.svg)](https://gitlab.com/bastillebsd-templates/salt-master/commits/master) + +## Bootstrap +```shell +bastille bootstrap https://gitlab.com/bastillebsd-templates/salt-master +``` + +## Usage +```shell +bastille template TARGET bastillebsd-templates/salt-master +``` + +## Optional +The following are optional customizations to this template and basic +instructions on how to do so. + +### Custom Config +Use a custom `etc/salt/master` config file to define master and other settings: + +1. fork bastillebsd-templates/salt-master +2. add an `OVERLAY` file to the template, contents: `usr` +3. add a `usr/local/etc/salt/master` file in the template +4. commit; bootstrap your fork; apply template diff --git a/sysutils/salt-master/SERVICE b/sysutils/salt-master/SERVICE new file mode 100644 index 0000000..207c315 --- /dev/null +++ b/sysutils/salt-master/SERVICE @@ -0,0 +1 @@ +salt_master start diff --git a/sysutils/salt-master/SYSRC b/sysutils/salt-master/SYSRC new file mode 100644 index 0000000..325b17a --- /dev/null +++ b/sysutils/salt-master/SYSRC @@ -0,0 +1 @@ +salt_master_enable=YES diff --git a/sysutils/salt-minion/LICENSE b/sysutils/salt-minion/LICENSE new file mode 100644 index 0000000..f5cdce0 --- /dev/null +++ b/sysutils/salt-minion/LICENSE @@ -0,0 +1,29 @@ +BSD 3-Clause License + +Copyright (c) 2019, Christer Edwards +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/sysutils/salt-minion/PKG b/sysutils/salt-minion/PKG new file mode 100644 index 0000000..f5d4fa4 --- /dev/null +++ b/sysutils/salt-minion/PKG @@ -0,0 +1 @@ +py37-salt diff --git a/sysutils/salt-minion/README.md b/sysutils/salt-minion/README.md new file mode 100644 index 0000000..0602f31 --- /dev/null +++ b/sysutils/salt-minion/README.md @@ -0,0 +1,27 @@ +# salt-minion +Bastille template to bootstrap Salt Minion + +## Status +[![pipeline status](https://gitlab.com/bastillebsd-templates/salt-minion/badges/master/pipeline.svg)](https://gitlab.com/bastillebsd-templates/salt-minion/commits/master) + +## Bootstrap +```shell +ishmael ~ # bastille bootstrap https://gitlab.com/bastillebsd-templates/salt-minion +``` + +## Usage +```shell +ishmael ~ # bastille template TARGET bastillebsd-templates/salt-minion +``` + +## Optional +The following are optional customizations to this template and basic +instructions on how to do so. + +### Custom Config +Use a custom `etc/salt/minion` config file to define master and other settings: + +1. fork bastillebsd-templates/salt-minion +2. add an `OVERLAY` file to the template, contents: `usr` +3. add a `usr/local/etc/salt/minion` file in the template +4. commit; bootstrap your fork; apply template diff --git a/sysutils/salt-minion/SERVICE b/sysutils/salt-minion/SERVICE new file mode 100644 index 0000000..851e558 --- /dev/null +++ b/sysutils/salt-minion/SERVICE @@ -0,0 +1 @@ +salt_minion start diff --git a/sysutils/salt-minion/SYSRC b/sysutils/salt-minion/SYSRC new file mode 100644 index 0000000..f2d9df2 --- /dev/null +++ b/sysutils/salt-minion/SYSRC @@ -0,0 +1 @@ +salt_minion_enable=YES diff --git a/sysutils/syslog-ng/Bastillefile b/sysutils/syslog-ng/Bastillefile new file mode 100644 index 0000000..35be891 --- /dev/null +++ b/sysutils/syslog-ng/Bastillefile @@ -0,0 +1,6 @@ +PKG syslog-ng +CP usr / +SYSRC syslogd_enable=NO +SYSRC syslog_ng_enable=YES +SERVICE syslogd onestop +SERVICE syslog-ng restart diff --git a/sysutils/syslog-ng/LICENSE b/sysutils/syslog-ng/LICENSE new file mode 100644 index 0000000..f0848e3 --- /dev/null +++ b/sysutils/syslog-ng/LICENSE @@ -0,0 +1,29 @@ +BSD 3-Clause License + +Copyright (c) 2018-2021, Christer Edwards +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +* Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/sysutils/syslog-ng/README.md b/sysutils/syslog-ng/README.md new file mode 100644 index 0000000..36142a3 --- /dev/null +++ b/sysutils/syslog-ng/README.md @@ -0,0 +1,16 @@ +## Status +[![pipeline status](https://gitlab.com/bastillebsd-templates/syslog-ng/badges/master/pipeline.svg)](https://gitlab.com/bastillebsd-templates/syslog-ng/commits/master) + +## syslog-ng +Bastille template to bootstrap syslog-ng + +## Bootstrap + +```shell +bastille bootstrap https://gitlab.com/bastillebsd-templates/syslog-ng +``` + +## Usage +```shell +bastille template TARGET bastillebsd-templates/syslog-ng +``` diff --git a/sysutils/syslog-ng/usr/local/etc/syslog-ng.conf b/sysutils/syslog-ng/usr/local/etc/syslog-ng.conf new file mode 100644 index 0000000..f14e367 --- /dev/null +++ b/sysutils/syslog-ng/usr/local/etc/syslog-ng.conf @@ -0,0 +1,185 @@ +@version:3.30 +@include "scl.conf" + +# +# This sample configuration file is essentially equilivent to the stock +# FreeBSD /etc/syslog.conf file. +# +# $FreeBSD: head/sysutils/syslog-ng/files/syslog-ng.conf.sample 340872 2014-01-24 00:14:07Z mat $ +# + +# +# options +# +options { chain_hostnames(off); flush_lines(0); threaded(yes); }; + +# +# sources +# +source src { system(); + udp(); tcp(port(514)); internal(); }; + +# +# destinations +# +destination messages { file("/var/log/messages"); }; +destination security { file("/var/log/security"); }; +destination authlog { file("/var/log/auth.log"); }; +destination maillog { file("/var/log/maillog"); }; +destination lpd-errs { file("/var/log/lpd-errs"); }; +destination xferlog { file("/var/log/xferlog"); }; +destination cron { file("/var/log/cron"); }; +destination debuglog { file("/var/log/debug.log"); }; +destination consolelog { file("/var/log/console.log"); }; +destination all { file("/var/log/all.log"); }; +destination newscrit { file("/var/log/news/news.crit"); }; +destination newserr { file("/var/log/news/news.err"); }; +destination newsnotice { file("/var/log/news/news.notice"); }; +destination slip { file("/var/log/slip.log"); }; +destination ppp { file("/var/log/ppp.log"); }; +destination console { file("/dev/console"); }; +destination allusers { usertty("*"); }; +#destination loghost { udp("loghost" port(514)); }; + +# +# log facility filters +# +filter f_auth { facility(auth); }; +filter f_authpriv { facility(authpriv); }; +filter f_not_authpriv { not facility(authpriv); }; +#filter f_console { facility(console); }; +filter f_cron { facility(cron); }; +filter f_daemon { facility(daemon); }; +filter f_ftp { facility(ftp); }; +filter f_kern { facility(kern); }; +filter f_lpr { facility(lpr); }; +filter f_mail { facility(mail); }; +filter f_news { facility(news); }; +filter f_security { facility(security); }; +filter f_user { facility(user); }; +filter f_uucp { facility(uucp); }; +filter f_local0 { facility(local0); }; +filter f_local1 { facility(local1); }; +filter f_local2 { facility(local2); }; +filter f_local3 { facility(local3); }; +filter f_local4 { facility(local4); }; +filter f_local5 { facility(local5); }; +filter f_local6 { facility(local6); }; +filter f_local7 { facility(local7); }; + +# +# log level filters +# +filter f_emerg { level(emerg); }; +filter f_alert { level(alert..emerg); }; +filter f_crit { level(crit..emerg); }; +filter f_err { level(err..emerg); }; +filter f_warning { level(warning..emerg); }; +filter f_notice { level(notice..emerg); }; +filter f_info { level(info..emerg); }; +filter f_debug { level(debug..emerg); }; +filter f_is_debug { level(debug); }; + +# +# program filters +# +filter f_ppp { program("ppp"); }; +filter f_slip { program("startslip"); }; + +# +# *.err;kern.warning;auth.notice;mail.crit /dev/console +# +#log { source(src); filter(f_err); destination(console); }; +#log { source(src); filter(f_kern); filter(f_warning); destination(console); }; +#log { source(src); filter(f_auth); filter(f_notice); destination(console); }; +#log { source(src); filter(f_mail); filter(f_crit); destination(console); }; + +# +# *.notice;authpriv.none;kern.debug;lpr.info;mail.crit;news.err /var/log/messages +# +log { source(src); filter(f_notice); filter(f_not_authpriv); destination(messages); }; +log { source(src); filter(f_kern); filter(f_debug); destination(messages); }; +log { source(src); filter(f_lpr); filter(f_info); destination(messages); }; +log { source(src); filter(f_mail); filter(f_crit); destination(messages); }; +log { source(src); filter(f_news); filter(f_err); destination(messages); }; + +# +# security.* /var/log/security +# +log { source(src); filter(f_security); destination(security); }; + +# +# auth.info;authpriv.info /var/log/auth.log +log { source(src); filter(f_auth); filter(f_info); destination(authlog); }; +log { source(src); filter(f_authpriv); filter(f_info); destination(authlog); }; + +# +# mail.info /var/log/maillog +# +log { source(src); filter(f_mail); filter(f_info); destination(maillog); }; + +# +# lpr.info /var/log/lpd-errs +# +log { source(src); filter(f_lpr); filter(f_info); destination(lpd-errs); }; + +# +# ftp.info /var/log/xferlog +# +log { source(src); filter(f_ftp); filter(f_info); destination(xferlog); }; + +# +# cron.* /var/log/cron +# +log { source(src); filter(f_cron); destination(cron); }; + +# +# *.=debug /var/log/debug.log +# +log { source(src); filter(f_is_debug); destination(debuglog); }; + +# +# *.emerg * +# +log { source(src); filter(f_emerg); destination(allusers); }; + +# +# uncomment this to log all writes to /dev/console to /var/log/console.log +# console.info /var/log/console.log +# +#log { source(src); filter(f_console); filter(f_info); destination(consolelog); }; + +# +# uncomment this to enable logging of all log messages to /var/log/all.log +# touch /var/log/all.log and chmod it to mode 600 before it will work +# *.* /var/log/all.log +# +#log { source(src); destination(all); }; + +# +# uncomment this to enable logging to a remote loghost named loghost +# *.* @loghost +# +#log { source(src); destination(loghost); }; + +# +# uncomment these if you're running inn +# news.crit /var/log/news/news.crit +# news.err /var/log/news/news.err +# news.notice /var/log/news/news.notice +# +#log { source(src); filter(f_news); filter(f_crit); destination(newscrit); }; +#log { source(src); filter(f_news); filter(f_err); destination(newserr); }; +#log { source(src); filter(f_news); filter(f_notice); destination(newsnotice); }; + +# +# !startslip +# *.* /var/log/slip.log +# +log { source(src); filter(f_slip); destination(slip); }; + +# +# !ppp +# *.* /var/log/ppp.log +# +log { source(src); filter(f_ppp); destination(ppp); }; diff --git a/sysutils/tarsnap/Bastillefile b/sysutils/tarsnap/Bastillefile new file mode 100644 index 0000000..29023ee --- /dev/null +++ b/sysutils/tarsnap/Bastillefile @@ -0,0 +1,3 @@ +PKG tarsnap +SYSRC tarsnap_enable=YES +SERVICE tarsnap start diff --git a/sysutils/tarsnap/LICENSE b/sysutils/tarsnap/LICENSE new file mode 100644 index 0000000..0f33c9f --- /dev/null +++ b/sysutils/tarsnap/LICENSE @@ -0,0 +1,29 @@ +BSD 3-Clause License + +Copyright (c) 2019-2021, Christer Edwards +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/sysutils/tarsnap/README.md b/sysutils/tarsnap/README.md new file mode 100644 index 0000000..5ad4708 --- /dev/null +++ b/sysutils/tarsnap/README.md @@ -0,0 +1,31 @@ +## Status +[![pipeline status](https://gitlab.com/bastillebsd-templates/tarsnap/badges/master/pipeline.svg)](https://gitlab.com/bastillebsd-templates/tarsnap/commits/master) + +## Bootstrap + +```shell +bastille bootstrap https://github.com/bastillebsd-templates/tarsnap +``` + +## Usage + +```shell +bastille template TARGET bastillebsd-templates/tarsnap +``` + +## Post Install + +Go to the following page and follow the steps for configuring your accounts and +setting up tarsnap to work with the service: + + https://www.tarsnap.com/gettingstarted.html + +You will have to create an account and put money in your account to use tarsnap. + +The minimum steps are: +1. set up the configuration file +2. Sign up for a tarsnap account +3. Deposit funds into account +4. Register the machine(s) on which you will be using tarsnap +5. Secure your tarsnap key. Without it your data is lost to EVERYONE including you +6. Enjoy knowing your data is safe. diff --git a/textproc/elasticsearch/Bastillefile b/textproc/elasticsearch/Bastillefile new file mode 100644 index 0000000..3f1f97d --- /dev/null +++ b/textproc/elasticsearch/Bastillefile @@ -0,0 +1,3 @@ +PKG elasticsearch7 +SYSRC elasticsearch_enable="YES" +SERVICE elasticsearch start diff --git a/textproc/elasticsearch/LICENSE b/textproc/elasticsearch/LICENSE new file mode 100644 index 0000000..0f33c9f --- /dev/null +++ b/textproc/elasticsearch/LICENSE @@ -0,0 +1,29 @@ +BSD 3-Clause License + +Copyright (c) 2019-2021, Christer Edwards +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/textproc/elasticsearch/README.md b/textproc/elasticsearch/README.md new file mode 100644 index 0000000..d8b5722 --- /dev/null +++ b/textproc/elasticsearch/README.md @@ -0,0 +1,15 @@ +## Status +[![pipeline status](https://gitlab.com/bastillebsd-templates/elasticsearch/badges/master/pipeline.svg)](https://gitlab.com/bastillebsd-templates/elasticsearch/commits/master) + +# elasticsearch +Bastille template to bootstrap Elasticserch + +## Bootstrap +```shell +bastille bootstrap https://gitlab.com/bastillebsd-templates/elasticsearch +``` + +## Usage +```shell +bastille template TARGET bastillebsd-templates/elasticsearch +``` diff --git a/textproc/kibana/LICENSE b/textproc/kibana/LICENSE new file mode 100644 index 0000000..f5cdce0 --- /dev/null +++ b/textproc/kibana/LICENSE @@ -0,0 +1,29 @@ +BSD 3-Clause License + +Copyright (c) 2019, Christer Edwards +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/textproc/kibana/OVERLAY b/textproc/kibana/OVERLAY new file mode 100644 index 0000000..73752c9 --- /dev/null +++ b/textproc/kibana/OVERLAY @@ -0,0 +1 @@ +usr diff --git a/textproc/kibana/PKG b/textproc/kibana/PKG new file mode 100644 index 0000000..8499400 --- /dev/null +++ b/textproc/kibana/PKG @@ -0,0 +1 @@ +kibana6 diff --git a/textproc/kibana/README.md b/textproc/kibana/README.md new file mode 100644 index 0000000..616c2d7 --- /dev/null +++ b/textproc/kibana/README.md @@ -0,0 +1,15 @@ +## Status +[![pipeline status](https://gitlab.com/bastillebsd-templates/kibana/badges/master/pipeline.svg)](https://gitlab.com/bastillebsd-templates/kibana/commits/master) + +## kibana +Bastille template to bootstrap kibana + +## Bootstrap +```shell +bastille bootstrap https://gitlab.com/bastillebsd-templates/kibana +``` + +## Usage +```shell +bastille template TARGET bastillebsd-templates/kibana +``` diff --git a/textproc/kibana/SERVICE b/textproc/kibana/SERVICE new file mode 100644 index 0000000..bf4db9b --- /dev/null +++ b/textproc/kibana/SERVICE @@ -0,0 +1 @@ +kibana start diff --git a/textproc/kibana/SYSRC b/textproc/kibana/SYSRC new file mode 100644 index 0000000..7d4da9d --- /dev/null +++ b/textproc/kibana/SYSRC @@ -0,0 +1 @@ +kibana_enable=YES diff --git a/textproc/kibana/usr/local/etc/kibana.yml b/textproc/kibana/usr/local/etc/kibana.yml new file mode 100644 index 0000000..93a71da --- /dev/null +++ b/textproc/kibana/usr/local/etc/kibana.yml @@ -0,0 +1,5 @@ +server.port: 5602 +server.host: "127.0.0.1" +elasticsearch.url: "http://127.0.0.1:9100" +logging.quiet: true + diff --git a/www/adguardhome/Bastillefile b/www/adguardhome/Bastillefile new file mode 100644 index 0000000..7c1b77d --- /dev/null +++ b/www/adguardhome/Bastillefile @@ -0,0 +1,3 @@ +PKG ca_root_nss adguardhome +SYSRC adguardhome_enable=YES +SERVICE adguardhome start diff --git a/www/adguardhome/LICENSE b/www/adguardhome/LICENSE new file mode 100644 index 0000000..e883cb5 --- /dev/null +++ b/www/adguardhome/LICENSE @@ -0,0 +1,29 @@ +BSD 3-Clause License + +Copyright (c) 2021, Christer Edwards +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/www/adguardhome/README.md b/www/adguardhome/README.md new file mode 100644 index 0000000..c098560 --- /dev/null +++ b/www/adguardhome/README.md @@ -0,0 +1,15 @@ +## Status +[![pipeline status](https://gitlab.com/bastillebsd-templates/adguardhome/badges/main/pipeline.svg)](https://gitlab.com/bastillebsd-templates/adguardhome/commits/main) + +## adguardhome +Bastille Template for Adguard Home + +## Bootstrap +```shell +bastille bootstrap https://gitlab.com/bastillebsd-templates/adguardhome +``` + +## Usage +```shell +bastille template TARGET bastillebsd-templates/adguardhome +``` diff --git a/www/apache/Bastillefile b/www/apache/Bastillefile new file mode 100644 index 0000000..729dddd --- /dev/null +++ b/www/apache/Bastillefile @@ -0,0 +1,5 @@ +PKG apache24 +SYSRC apache24_enable=YES +SYSRC apache24_flags="" +CMD httpd -t +SERVICE apache24 start diff --git a/www/apache/LICENSE b/www/apache/LICENSE new file mode 100644 index 0000000..0f33c9f --- /dev/null +++ b/www/apache/LICENSE @@ -0,0 +1,29 @@ +BSD 3-Clause License + +Copyright (c) 2019-2021, Christer Edwards +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/www/apache/README.md b/www/apache/README.md new file mode 100644 index 0000000..1cd5f46 --- /dev/null +++ b/www/apache/README.md @@ -0,0 +1,17 @@ +## Status +[![pipeline status](https://gitlab.com/bastillebsd-templates/apache/badges/master/pipeline.svg)](https://gitlab.com/bastillebsd-templates/apache/commits/master) + +## apache +Bastille template to bootstrap Apache + +## Bootstrap + +```shell +bastille bootstrap https://gitlab.com/bastillebsd-templates/apache +``` + +## Usage + +```shell +bastille template TARGET bastillebsd-templates/apache +``` diff --git a/www/caddy/Bastillefile b/www/caddy/Bastillefile new file mode 100644 index 0000000..ac0556d --- /dev/null +++ b/www/caddy/Bastillefile @@ -0,0 +1,3 @@ +PKG caddy +SYSRC caddy_enable=YES +SERVICE caddy start diff --git a/www/caddy/LICENSE b/www/caddy/LICENSE new file mode 100644 index 0000000..e883cb5 --- /dev/null +++ b/www/caddy/LICENSE @@ -0,0 +1,29 @@ +BSD 3-Clause License + +Copyright (c) 2021, Christer Edwards +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/www/caddy/README.md b/www/caddy/README.md new file mode 100644 index 0000000..4dbe7df --- /dev/null +++ b/www/caddy/README.md @@ -0,0 +1,15 @@ +## Status +[![pipeline status](https://gitlab.com/bastillebsd-templates/caddy/badges/main/pipeline.svg)](https://gitlab.com/bastillebsd-templates/caddy/commits/main) + +## Caddy +Bastille template to bootstrap Caddy + +## Bootstrap +```shell +bastille bootstrap https://gitlab.com/bastillebsd-templates/caddy +``` + +## Usage +```shell +bastille template TARGET bastillebsd-templates/caddy +``` diff --git a/www/firefox/LICENSE b/www/firefox/LICENSE new file mode 100644 index 0000000..f5cdce0 --- /dev/null +++ b/www/firefox/LICENSE @@ -0,0 +1,29 @@ +BSD 3-Clause License + +Copyright (c) 2019, Christer Edwards +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/www/firefox/PKG b/www/firefox/PKG new file mode 100644 index 0000000..dbfb8f9 --- /dev/null +++ b/www/firefox/PKG @@ -0,0 +1 @@ +firefox diff --git a/www/firefox/README.md b/www/firefox/README.md new file mode 100644 index 0000000..48644d5 --- /dev/null +++ b/www/firefox/README.md @@ -0,0 +1,18 @@ +# Firefox +Bastille template to bootstrap Firefox + +## Status +[![pipeline status](https://gitlab.com/bastillebsd-templates/firefox/badges/master/pipeline.svg)](https://gitlab.com/bastillebsd-templates/firefox/commits/master) + +## Bootstrap +```shell +bastille bootstrap https://gitlab.com/bastillebsd-templates/firefox +``` + +## Usage +```shell +bastille template TARGET bastillebsd-templates/firefox +``` + +Connect to this container using `ssh -X container 'firefox'` to launch the +browser. diff --git a/www/gitea/Bastillefile b/www/gitea/Bastillefile new file mode 100644 index 0000000..cf446ee --- /dev/null +++ b/www/gitea/Bastillefile @@ -0,0 +1,11 @@ +ARG SECRET_KEY +ARG JWT_SECRET +ARG INTERNAL_TOKEN + +PKG gitea +CP usr / +RENDER /usr/local/etc/gitea/conf/app.ini +CMD chown -R git:git /usr/local/etc/gitea +SYSRC gitea_enable=YES +SERVICE gitea start +CMD echo "$?" diff --git a/www/gitea/LICENSE b/www/gitea/LICENSE new file mode 100644 index 0000000..f0848e3 --- /dev/null +++ b/www/gitea/LICENSE @@ -0,0 +1,29 @@ +BSD 3-Clause License + +Copyright (c) 2018-2021, Christer Edwards +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +* Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/www/gitea/README.md b/www/gitea/README.md new file mode 100644 index 0000000..5796eff --- /dev/null +++ b/www/gitea/README.md @@ -0,0 +1,16 @@ +## Status +[![pipeline status](https://gitlab.com/bastillebsd-templates/gitea/badges/devel/pipeline.svg)](https://gitlab.com/bastillebsd-templates/gitea/commits/devel) + +## gitea +Bastille template to bootstrap gitea + +## Bootstrap + +```shell +bastille bootstrap https://gitlab.com/bastillebsd-templates/gitea +``` + +## Usage +```shell +bastille template TARGET bastillebsd-templates/gitea --arg SECRET_KEY=`openssl rand -base64 16` --arg JWT_SECRET=`openssl rand -base64 32` --arg INTERNAL_TOKEN=`openssl rand -base64 64` +``` diff --git a/www/gitea/usr/local/etc/gitea/conf/app.ini b/www/gitea/usr/local/etc/gitea/conf/app.ini new file mode 100644 index 0000000..7835628 --- /dev/null +++ b/www/gitea/usr/local/etc/gitea/conf/app.ini @@ -0,0 +1,92 @@ +# +# Sample Configuration for Gitea using SQLite +# +# For information on the available settings, consult the online +# documentation, or see the accompanying file app.ini.defaults, which +# contains the settings incorporated into the gitea binary. +# +# This sample configuration runs Gitea with a local database. Before +# running this configuration, make sure to change the INTERNAL_TOKEN, +# JWT_SECRET, and SECRET_KEY variables. SECRET_KEY is a password of your +# choosing, INTERNAL_TOKEN is a 64-byte random number in BASE64 encoding, +# JWT_SECRET is a 32-byte random number in BASE64 encoding. +# +# You can generate the token using for example: +# openssl rand -base64 64 +# +# You can let Gitea add these to the config for you; you need to make +# app.ini writeable by the git user. +# +# There are no pre-configured users; the first user to register becomes an +# admin. In this sample configuration, the HTTP server only listens on +# localhost. +# +# If you'd rather use the web-based installer, remove this conf/app.ini file +# and make /usr/local/etc/gitea/conf writeable to the git user. +APP_NAME = Gitea: Git with a cup of tea +RUN_USER = git +RUN_MODE = prod + +[database] +DB_TYPE = sqlite3 +HOST = ${JAIL_IP}:3306 +NAME = gitea +PASSWD = +PATH = /var/db/gitea/gitea.db +SSL_MODE = disable +USER = root + +[indexer] +ISSUE_INDEXER_PATH = /var/db/gitea/indexers/issues.bleve + +[log] +ROOT_PATH = /var/log/gitea +MODE = file +LEVEL = Info + +[mailer] +ENABLED = false + +[oauth2] +JWT_SECRET = ${JWT_SECRET} + +[picture] +AVATAR_UPLOAD_PATH = /var/db/gitea/data/avatars +DISABLE_GRAVATAR = false +ENABLE_FEDERATED_AVATAR = false + +[repository] +ROOT = /var/db/gitea/gitea-repositories +# Gitea's default is 'bash', so if you have bash installed, you can comment +# this out. +SCRIPT_TYPE = sh + +[repository.upload] +TEMP_PATH = /var/db/gitea/data/tmp/uploads + +[security] +INSTALL_LOCK = true +INTERNAL_TOKEN = ${INTERNAL_TOKEN} +SECRET_KEY = ${SECRET_KEY} + +[session] +PROVIDER = file +PROVIDER_CONFIG = /var/db/gitea/data/sessions + +[server] +DOMAIN = ${JAIL_NAME} +HTTP_ADDR = ${JAIL_IP} +HTTP_PORT = 3000 +ROOT_URL = http://${JAIL_IP}:3000/ +DISABLE_SSH = false +SSH_DOMAIN = %(DOMAIN)s +SSH_PORT = 22 +OFFLINE_MODE = false +APP_DATA_PATH = /var/db/gitea/data + +[service] +REGISTER_EMAIL_CONFIRM = false +ENABLE_NOTIFY_MAIL = false +DISABLE_REGISTRATION = false +ENABLE_CAPTCHA = true +REQUIRE_SIGNIN_VIEW = false diff --git a/www/grafana/Bastillefile b/www/grafana/Bastillefile new file mode 100644 index 0000000..02d01a5 --- /dev/null +++ b/www/grafana/Bastillefile @@ -0,0 +1,3 @@ +PKG grafana8 +SYSRC grafana_enable=YES +SERVICE grafana start diff --git a/www/grafana/LICENSE b/www/grafana/LICENSE new file mode 100644 index 0000000..0f33c9f --- /dev/null +++ b/www/grafana/LICENSE @@ -0,0 +1,29 @@ +BSD 3-Clause License + +Copyright (c) 2019-2021, Christer Edwards +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/www/grafana/README.md b/www/grafana/README.md new file mode 100644 index 0000000..09011b4 --- /dev/null +++ b/www/grafana/README.md @@ -0,0 +1,14 @@ +## Status +[![pipeline status](https://gitlab.com/bastillebsd-templates/grafana/badges/master/pipeline.svg)](https://gitlab.com/bastillebsd-templates/grafana/commits/master) + +## Bootstrap + +```shell +bastille bootstrap https://github.com/bastillebsd-templates/grafana +``` + +## Usage + +```shell +bastille template TARGET bastillebsd-templates/grafana +``` diff --git a/www/guacamole/Bastillefile b/www/guacamole/Bastillefile new file mode 100644 index 0000000..8849a2f --- /dev/null +++ b/www/guacamole/Bastillefile @@ -0,0 +1,22 @@ +PKG guacamole-server guacamole-client mysql80-server mysql-connector-java +SYSRC guacd_enable=YES +SYSRC tomcat9_enable=YES +SYSRC mysql_enable=YES +CMD mkdir /usr/local/etc/guacamole-client/lib +CMD mkdir /usr/local/etc/guacamole-client/extensions +CMD cp /usr/local/share/java/classes/mysql-connector-java.jar /usr/local/etc/guacamole-client/lib +CMD tar xvfz /usr/local/share/guacamole-client/guacamole-auth-jdbc.tar.gz -C /tmp/ +CMD cp /tmp/guacamole-auth-jdbc-*/mysql/*.jar /usr/local/etc/guacamole-client/extensions +CMD cp /usr/local/etc/guacamole-server/guacd.conf.sample /usr/local/etc/guacamole-server/guacd.conf +CMD cp /usr/local/etc/guacamole-client/logback.xml.sample /usr/local/etc/guacamole-client/logback.xml +CMD cp /usr/local/etc/guacamole-client/guacamole.properties.sample /usr/local/etc/guacamole-client/guacamole.properties +CMD echo "mysql-port: 3306" >> /usr/local/etc/guacamole-client/guacamole.properties +CMD echo "mysql-database: guacamole_db" >> /usr/local/etc/guacamole-client/guacamole.properties +CMD echo "mysql-username: guacamole_user" >> /usr/local/etc/guacamole-client/guacamole.properties +CMD echo "mysql-password: Gu@c2Mo1e" >> /usr/local/etc/guacamole-client/guacamole.properties +SERVICE mysql-server start +CMD mysql -u root -e "ALTER USER 'root'@'localhost' IDENTIFIED BY 'Gu@c2Mo1e';CREATE DATABASE guacamole_db;CREATE USER 'guacamole_user'@'' IDENTIFIED BY 'Gu@c2Mo1e';GRANT SELECT,INSERT,UPDATE,DELETE ON guacamole_db.* TO 'guacamole_user'@'';FLUSH PRIVILEGES;"; +CMD cat /tmp/guacamole-auth-jdbc-*/mysql/schema/*.sql | mysql -u root -pGu@c2Mo1e guacamole_db +SERVICE mysql-server restart +SERVICE guacd restart +SERVICE tomcat9 restart diff --git a/www/guacamole/README.md b/www/guacamole/README.md new file mode 100644 index 0000000..60ee6cf --- /dev/null +++ b/www/guacamole/README.md @@ -0,0 +1,15 @@ +# Guacamole +Bastille template to bootstrap Guacamole + +## Status +[![pipeline status](https://gitlab.com/bastillebsd-templates/guacamole/badges/master/pipeline.svg)](https://gitlab.com/bastillebsd-templates/guacamole/commits/master) + +## Bootstrap +```shell +bastille bootstrap https://gitlab.com/bastillebsd-templates/guacamole +``` + +## Usage +```shell +bastille template TARGET bastillebsd-templates/guacamole +``` diff --git a/www/haproxy/CMD b/www/haproxy/CMD new file mode 100644 index 0000000..eec9b74 --- /dev/null +++ b/www/haproxy/CMD @@ -0,0 +1 @@ +haproxy -t diff --git a/www/haproxy/LICENSE b/www/haproxy/LICENSE new file mode 100644 index 0000000..f5cdce0 --- /dev/null +++ b/www/haproxy/LICENSE @@ -0,0 +1,29 @@ +BSD 3-Clause License + +Copyright (c) 2019, Christer Edwards +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/www/haproxy/PKG b/www/haproxy/PKG new file mode 100644 index 0000000..6968bad --- /dev/null +++ b/www/haproxy/PKG @@ -0,0 +1 @@ +haproxy diff --git a/www/haproxy/README.md b/www/haproxy/README.md new file mode 100644 index 0000000..51ef0b6 --- /dev/null +++ b/www/haproxy/README.md @@ -0,0 +1,15 @@ +## Status +[![pipeline status](https://gitlab.com/bastillebsd-templates/haproxy/badges/master/pipeline.svg)](https://gitlab.com/bastillebsd-templates/haproxy/commits/master) + +## haproxy +Bastille template to bootstrap HAProxy + +## Bootstrap +```shell +bastille bootstrap https://gitlab.com/bastillebsd-templates/haproxy +``` + +## Usage +```shell +bastille template TARGET bastillebsd-templates/haproxy +``` diff --git a/www/haproxy/SERVICE b/www/haproxy/SERVICE new file mode 100644 index 0000000..dd317bd --- /dev/null +++ b/www/haproxy/SERVICE @@ -0,0 +1 @@ +haproxy start diff --git a/www/haproxy/SYSRC b/www/haproxy/SYSRC new file mode 100644 index 0000000..894c0fe --- /dev/null +++ b/www/haproxy/SYSRC @@ -0,0 +1 @@ +haproxy_enable=YES diff --git a/www/nextcloud/Bastillefile b/www/nextcloud/Bastillefile new file mode 100644 index 0000000..20f3ccd --- /dev/null +++ b/www/nextcloud/Bastillefile @@ -0,0 +1,4 @@ +INCLUDE bastillebsd-templates/mariadb-server +INCLUDE bastillebsd-templates/apache + +PKG nextcloud-php74 diff --git a/www/nextcloud/LICENSE b/www/nextcloud/LICENSE new file mode 100644 index 0000000..e883cb5 --- /dev/null +++ b/www/nextcloud/LICENSE @@ -0,0 +1,29 @@ +BSD 3-Clause License + +Copyright (c) 2021, Christer Edwards +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/www/nextcloud/README.md b/www/nextcloud/README.md new file mode 100644 index 0000000..7d8cc15 --- /dev/null +++ b/www/nextcloud/README.md @@ -0,0 +1,17 @@ +## Status +[![pipeline status](https://gitlab.com/bastillebsd-templates/nextcloud/badges/main/pipeline.svg)](https://gitlab.com/bastillebsd-templates/nextcloud/commits/main) + +## nextcloud +Bastille template to bootstrap Nextcloud + +## Bootstrap + +```shell +bastille bootstrap https://gitlab.com/bastillebsd-templates/nextcloud +``` + +## Usage + +```shell +bastille template TARGET bastillebsd-templates/nextcloud +``` diff --git a/www/nginx-poudriere-pkg-conf/LICENSE b/www/nginx-poudriere-pkg-conf/LICENSE new file mode 100644 index 0000000..994cf0b --- /dev/null +++ b/www/nginx-poudriere-pkg-conf/LICENSE @@ -0,0 +1,29 @@ +BSD 3-Clause License + +Copyright (c) 2018-2020, Christer Edwards +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +* Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/www/nginx-poudriere-pkg-conf/OVERLAY b/www/nginx-poudriere-pkg-conf/OVERLAY new file mode 100644 index 0000000..73752c9 --- /dev/null +++ b/www/nginx-poudriere-pkg-conf/OVERLAY @@ -0,0 +1 @@ +usr diff --git a/www/nginx-poudriere-pkg-conf/README.md b/www/nginx-poudriere-pkg-conf/README.md new file mode 100644 index 0000000..3d78aae --- /dev/null +++ b/www/nginx-poudriere-pkg-conf/README.md @@ -0,0 +1,20 @@ +## Status +[![pipeline status](https://gitlab.com/bastillebsd-templates/nginx-poudriere-pkg-conf/badges/master/pipeline.svg)](https://gitlab.com/bastillebsd-templates/nginx-poudriere-pkg-conf/commits/master) + +## nginx-poudriere-pkg-conf +Bastille Template: nginx-poudriere-pkg-conf + +Fetch and apply this template with: + +```shell +bastille bootstrap https://gitlab.com/BastilleBSD-Templates/nginx-poudriere-pkg-conf +bastille template TARGET BastilleBSD-Templates/nginx-poudriere-pkg-conf +``` + +## Description +This template adds a `poudriere-local.conf` to the container's configured +repository. This is meant to be used with +https://gitlab.com/bastillebsd-templates/nginx-poudriere + +Note: update the `10.17.89.80` example IP address with the address of your pkg +container. diff --git a/www/nginx-poudriere-pkg-conf/usr/local/etc/pkg/repos/poudriere-local.conf b/www/nginx-poudriere-pkg-conf/usr/local/etc/pkg/repos/poudriere-local.conf new file mode 100644 index 0000000..c5e8360 --- /dev/null +++ b/www/nginx-poudriere-pkg-conf/usr/local/etc/pkg/repos/poudriere-local.conf @@ -0,0 +1,4 @@ +poudriere-local: { + url: "http://10.17.89.80/pkg/${ABI}", + enabled: yes +} diff --git a/www/nginx-poudriere/Bastillefile b/www/nginx-poudriere/Bastillefile new file mode 100644 index 0000000..dc979f8 --- /dev/null +++ b/www/nginx-poudriere/Bastillefile @@ -0,0 +1,7 @@ +CMD mkdir -p /usr/local/share/poudriere +CMD mkdir -p /usr/local/poudriere/data +MOUNT /usr/local/share/poudriere usr/local/share/poudriere nullfs ro 0 0 +MOUNT /usr/local/poudriere/data usr/local/poudriere/data nullfs ro 0 0 +INCLUDE https://gitlab.com/bastillebsd-templates/nginx +CP usr / +SERVICE nginx restart diff --git a/www/nginx-poudriere/LICENSE b/www/nginx-poudriere/LICENSE new file mode 100644 index 0000000..f0848e3 --- /dev/null +++ b/www/nginx-poudriere/LICENSE @@ -0,0 +1,29 @@ +BSD 3-Clause License + +Copyright (c) 2018-2021, Christer Edwards +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +* Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/www/nginx-poudriere/README.md b/www/nginx-poudriere/README.md new file mode 100644 index 0000000..aecdfff --- /dev/null +++ b/www/nginx-poudriere/README.md @@ -0,0 +1,27 @@ +## Status +[![pipeline status](https://gitlab.com/bastillebsd-templates/nginx-poudriere/badges/master/pipeline.svg)](https://gitlab.com/bastillebsd-templates/nginx-poudriere/commits/master) + +## nginx-poudriere +Bastille template to bootstrap nginx for poudriere + +## Bootstrap + +```shell +bastille bootstrap https://gitlab.com/bastillebsd-templates/nginx-poudriere +``` + +## Usage +```shell +bastille template TARGET bastillebsd-templates/nginx-poudriere +``` + +## Notes +The `nginx.conf` OVERLAY assumes a poudriere naming scheme of +"majorversionarch" (ie "12amd64", "13aarch64", etc) and a "default" ports +tree. + +Example: FreeBSD:12:amd64 will be served from 12amd64-default poudriere +repository, FreeBSD:13:aarch64 from 13aarch64-default, etc. + +See: https://gitlab.com/bastillebsd-templates/nginx-poudriere-pkg-conf for client +repo config. diff --git a/www/nginx-poudriere/usr/local/etc/nginx/nginx.conf b/www/nginx-poudriere/usr/local/etc/nginx/nginx.conf new file mode 100644 index 0000000..622eda4 --- /dev/null +++ b/www/nginx-poudriere/usr/local/etc/nginx/nginx.conf @@ -0,0 +1,175 @@ +user nobody; +worker_processes auto; + +events { + worker_connections 1024; +} + +http { + include mime.types; + default_type application/octet-stream; + access_log /var/log/nginx/access.log; + sendfile on; + keepalive_timeout 65; + + # Allow gzipping js, css, log, svg and json files. + gzip on; + gzip_buffers 16 8k; + gzip_comp_level 6; + gzip_http_version 1.0; + gzip_min_length 1100; + gzip_proxied any; + gzip_types text/plain text/css application/x-javascript text/xml application/xml application/xml+rss text/javascript image/gif image/jpeg image/png application/json image/svg+xml; + + types { + text/plain log; + } + + server { + listen 80 default_server; + root /usr/local/share/poudriere/html; + + ## Allow caching static resources + location ~* ^.+\.(jpg|jpeg|gif|png|ico|svg|woff|css|js|html)$ { + add_header Cache-Control "public"; + expires 2d; + } + + ## pkg index + location /pkg { + autoindex on; + alias /usr/local/poudriere/data/packages; + } + + ## 10.x-RELEASE (no longer updated) + location /pkg/FreeBSD:10:amd64 { + autoindex on; + alias /usr/local/poudriere/data/packages/10amd64-default; + } + location /pkg/FreeBSD:10:i386 { + autoindex on; + alias /usr/local/poudriere/data/packages/10i386-default; + } + + ## 11.x-RELEASE (tier 1) + location /pkg/FreeBSD:11:amd64 { + autoindex on; + alias /usr/local/poudriere/data/packages/11amd64-default; + } + location /pkg/FreeBSD:11:i386 { + autoindex on; + alias /usr/local/poudriere/data/packages/11i386-default; + } + location /pkg/FreeBSD:11:aarch64 { + autoindex on; + alias /usr/local/poudriere/data/packages/11aarch64-default; + } + ## 11.x-RELEASE (tier 2) + location /pkg/FreeBSD:11:armv6 { + autoindex on; + alias /usr/local/poudriere/data/packages/11armv6-default; + } + location /pkg/FreeBSD:11:mips { + autoindex on; + alias /usr/local/poudriere/data/packages/11mips-default; + } + location /pkg/FreeBSD:11:mips64 { + autoindex on; + alias /usr/local/poudriere/data/packages/11mips64-default; + } + + ## 12.x-RELEASE (tier 1) + location /pkg/FreeBSD:12:amd64 { + autoindex on; + alias /usr/local/poudriere/data/packages/12amd64-default; + } + location /pkg/FreeBSD:12:i386 { + autoindex on; + alias /usr/local/poudriere/data/packages/12i386-default; + } + location /pkg/FreeBSD:12:aarch64 { + autoindex on; + alias /usr/local/poudriere/data/packages/12aarch64-default; + } + ## 12.x-RELEASE (tier 2) + location /pkg/FreeBSD:12:armv6 { + autoindex on; + alias /usr/local/poudriere/data/packages/12armv6-default; + } + location /pkg/FreeBSD:12:armv7 { + autoindex on; + alias /usr/local/poudriere/data/packages/12armv7-default; + } + location /pkg/FreeBSD:12:mips { + autoindex on; + alias /usr/local/poudriere/data/packages/12mips-default; + } + location /pkg/FreeBSD:12:mips64 { + autoindex on; + alias /usr/local/poudriere/data/packages/12mips64-default; + } + location /pkg/FreeBSD:12:powerpc { + autoindex on; + alias /usr/local/poudriere/data/packages/12powerpc-default; + } + + ## 13.x-RELEASE (tier 1) + location /pkg/FreeBSD:13:amd64 { + autoindex on; + alias /usr/local/poudriere/data/packages/13amd64-default; + } + location /pkg/FreeBSD:13:i386 { + autoindex on; + alias /usr/local/poudriere/data/packages/13i386-default; + } + location /pkg/FreeBSD:13:aarch64 { + autoindex on; + alias /usr/local/poudriere/data/packages/13aarch64-default; + } + ## 13.x-RELEASE (tier 2) + location /pkg/FreeBSD:13:armv6 { + autoindex on; + alias /usr/local/poudriere/data/packages/13armv6-default; + } + location /pkg/FreeBSD:13:armv7 { + autoindex on; + alias /usr/local/poudriere/data/packages/13armv7-default; + } + location /pkg/FreeBSD:13:mips { + autoindex on; + alias /usr/local/poudriere/data/packages/13mips-default; + } + location /pkg/FreeBSD:13:mips64 { + autoindex on; + alias /usr/local/poudriere/data/packages/13mips64-default; + } + location /pkg/FreeBSD:13:powerpc64 { + autoindex on; + alias /usr/local/poudriere/data/packages/13powerpc64-default; + } + + ## log data + location /data { + alias /usr/local/poudriere/data/logs/bulk; + + # Allow caching dynamic files but ensure they get rechecked + location ~* ^.+\.(log|txz|tbz|bz2|gz)$ { + add_header Cache-Control "public, must-revalidate, proxy-revalidate"; + } + + # Don't log json requests as they come in frequently and ensure + # caching works as expected + location ~* ^.+\.(json)$ { + add_header Cache-Control "public, must-revalidate, proxy-revalidate"; + access_log off; + log_not_found off; + } + + # Allow indexing only in log dirs + location ~ /data/?.*/(logs|latest-per-pkg)/ { + autoindex on; + } + break; + } + } +} diff --git a/www/nginx/Bastillefile b/www/nginx/Bastillefile new file mode 100644 index 0000000..670257a --- /dev/null +++ b/www/nginx/Bastillefile @@ -0,0 +1,5 @@ +PKG nginx +CP usr / +SYSRC nginx_enable=YES +CMD nginx -t +SERVICE nginx restart diff --git a/www/nginx/LICENSE b/www/nginx/LICENSE new file mode 100644 index 0000000..0f33c9f --- /dev/null +++ b/www/nginx/LICENSE @@ -0,0 +1,29 @@ +BSD 3-Clause License + +Copyright (c) 2019-2021, Christer Edwards +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/www/nginx/README.md b/www/nginx/README.md new file mode 100644 index 0000000..6c65efa --- /dev/null +++ b/www/nginx/README.md @@ -0,0 +1,18 @@ +## Status +[![pipeline status](https://gitlab.com/bastillebsd-templates/nginx/badges/master/pipeline.svg)](https://gitlab.com/bastillebsd-templates/nginx/commits/master) + +## nginx +Bastille template to bootstrap nginx + +## Bootstrap + +```shell +bastille bootstrap https://gitlab.com/bastillebsd-templates/nginx +``` + +## Usage + +```shell +bastille template TARGET bastillebsd-templates/nginx + +``` diff --git a/www/nginx/usr/local/etc/nginx/nginx.conf b/www/nginx/usr/local/etc/nginx/nginx.conf new file mode 100644 index 0000000..04e9765 --- /dev/null +++ b/www/nginx/usr/local/etc/nginx/nginx.conf @@ -0,0 +1,36 @@ +user nobody; +worker_processes auto; + +error_log /var/log/nginx/error.log; +pid /var/run/nginx.pid; + +events { + worker_connections 1024; +} + +http { + include mime.types; + default_type application/octet-stream; + + access_log /var/log/nginx/access.log; + + sendfile on; + keepalive_timeout 65; + + server { + listen 80; + server_name localhost; + + location / { + root /usr/local/www/nginx; + index index.html index.htm; + } + + error_page 404 /404.html; + + error_page 500 502 503 504 /50x.html; + location = /50x.html { + root /usr/local/www/nginx-dist; + } + } +} diff --git a/www/node/LICENSE b/www/node/LICENSE new file mode 100644 index 0000000..f5cdce0 --- /dev/null +++ b/www/node/LICENSE @@ -0,0 +1,29 @@ +BSD 3-Clause License + +Copyright (c) 2019, Christer Edwards +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/www/node/PKG b/www/node/PKG new file mode 100644 index 0000000..63b6cee --- /dev/null +++ b/www/node/PKG @@ -0,0 +1,2 @@ +node +npm diff --git a/www/node/README.md b/www/node/README.md new file mode 100644 index 0000000..ce392c5 --- /dev/null +++ b/www/node/README.md @@ -0,0 +1,15 @@ +## Status +[![pipeline status](https://gitlab.com/bastillebsd-templates/node/badges/master/pipeline.svg)](https://gitlab.com/bastillebsd-templates/node/commits/master) + +## node +Bastille Template to bootstrap node (and npm) + +## Bootstrap +```shell +bastille bootstrap https://gitlab.com/bastillebsd-templates/node +``` + +## Usage +```shell +bastille template TARGET bastillebsd-templates/node +``` diff --git a/www/npm/LICENSE b/www/npm/LICENSE new file mode 100644 index 0000000..f5cdce0 --- /dev/null +++ b/www/npm/LICENSE @@ -0,0 +1,29 @@ +BSD 3-Clause License + +Copyright (c) 2019, Christer Edwards +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/www/npm/PKG b/www/npm/PKG new file mode 100644 index 0000000..b235581 --- /dev/null +++ b/www/npm/PKG @@ -0,0 +1 @@ +npm diff --git a/www/npm/README.md b/www/npm/README.md new file mode 100644 index 0000000..8a16620 --- /dev/null +++ b/www/npm/README.md @@ -0,0 +1,15 @@ +# NPM +Bastille template to bootstrap NPM + +## Status +[![pipeline status](https://gitlab.com/bastillebsd-templates/npm/badges/master/pipeline.svg)](https://gitlab.com/bastillebsd-templates/npm/commits/master) + +## Bootstrap +```shell +bastille bootstrap https://gitlab.com/bastillebsd-templates/npm +``` + +## Usage +```shell +bastille template TARGET bastillebsd-templates/npm +``` diff --git a/www/traefik/LICENSE b/www/traefik/LICENSE new file mode 100644 index 0000000..f5cdce0 --- /dev/null +++ b/www/traefik/LICENSE @@ -0,0 +1,29 @@ +BSD 3-Clause License + +Copyright (c) 2019, Christer Edwards +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/www/traefik/PKG b/www/traefik/PKG new file mode 100644 index 0000000..73a0ec3 --- /dev/null +++ b/www/traefik/PKG @@ -0,0 +1 @@ +traefik diff --git a/www/traefik/README.md b/www/traefik/README.md new file mode 100644 index 0000000..0f54204 --- /dev/null +++ b/www/traefik/README.md @@ -0,0 +1,18 @@ +## Status +[![pipeline status](https://gitlab.com/bastillebsd-templates/traefik/badges/master/pipeline.svg)](https://gitlab.com/bastillebsd-templates/traefik/commits/master) + +## traefik +Bastille template to bootstrap traefik + +## Bootstrap + +```shell +bastille bootstrap https://gitlab.com/bastillebsd-templates/traefik +``` + +## Usage + +```shell +bastille template TARGET bastillebsd-templates/traefik + +``` diff --git a/www/traefik/SERVICE b/www/traefik/SERVICE new file mode 100644 index 0000000..d77a8f1 --- /dev/null +++ b/www/traefik/SERVICE @@ -0,0 +1 @@ +traefik start diff --git a/www/traefik/SYSRC b/www/traefik/SYSRC new file mode 100644 index 0000000..ce25616 --- /dev/null +++ b/www/traefik/SYSRC @@ -0,0 +1 @@ +traefik_enable=YES diff --git a/www/varnish/LICENSE b/www/varnish/LICENSE new file mode 100644 index 0000000..f5cdce0 --- /dev/null +++ b/www/varnish/LICENSE @@ -0,0 +1,29 @@ +BSD 3-Clause License + +Copyright (c) 2019, Christer Edwards +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/www/varnish/PKG b/www/varnish/PKG new file mode 100644 index 0000000..3be29fc --- /dev/null +++ b/www/varnish/PKG @@ -0,0 +1 @@ +varnish6 diff --git a/www/varnish/README.md b/www/varnish/README.md new file mode 100644 index 0000000..6596e37 --- /dev/null +++ b/www/varnish/README.md @@ -0,0 +1,15 @@ +# Varnish +Bastille template to bootstrap Varnish + +## Status +[![pipeline status](https://gitlab.com/bastillebsd-templates/varnish/badges/master/pipeline.svg)](https://gitlab.com/bastillebsd-templates/varnish/commits/master) + +## Bootstrap +```shell +bastille bootstrap https://gitlab.com/bastillebsd-templates/varnish +``` + +## Usage +```shell +bastille template TARGET bastillebsd-templates/varnish +``` diff --git a/www/varnish/SERVICE b/www/varnish/SERVICE new file mode 100644 index 0000000..56217cc --- /dev/null +++ b/www/varnish/SERVICE @@ -0,0 +1 @@ +varnishd start diff --git a/www/varnish/SYSRC b/www/varnish/SYSRC new file mode 100644 index 0000000..94849d9 --- /dev/null +++ b/www/varnish/SYSRC @@ -0,0 +1 @@ +varnishd_enable=YES diff --git a/www/wordpress/Bastillefile b/www/wordpress/Bastillefile new file mode 100644 index 0000000..2c43422 --- /dev/null +++ b/www/wordpress/Bastillefile @@ -0,0 +1,14 @@ +PKG mariadb105-server nginx php74-curl php74-dom php74-fileinfo php74-exif php74-json php74-mbstring php74-extensions php74-mysqli php74-openssl php74-pecl-libsodium php74-xml php74-zip php74-filter php74-gd php74-iconv php74-simplexml php74-xmlreader php74-zlib php74-pecl-imagick php74-pecl-mcrypt php74-bcmath wordpress + +CP usr / +CP root / + +SYSRC mysql_enable=YES +SYSRC php_fpm_enable=YES +SYSRC nginx_enable=YES + +SERVICE mysql-server start +SERVICE php-fpm start +SERVICE nginx start + +CMD /root/bootstrap-wp.sh diff --git a/www/wordpress/LICENSE b/www/wordpress/LICENSE new file mode 100644 index 0000000..0f33c9f --- /dev/null +++ b/www/wordpress/LICENSE @@ -0,0 +1,29 @@ +BSD 3-Clause License + +Copyright (c) 2019-2021, Christer Edwards +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/www/wordpress/README.md b/www/wordpress/README.md new file mode 100644 index 0000000..6640667 --- /dev/null +++ b/www/wordpress/README.md @@ -0,0 +1,15 @@ +## Deployment Test Status +[![pipeline status](https://gitlab.com/bastillebsd-templates/wordpress/badges/master/pipeline.svg)](https://gitlab.com/bastillebsd-templates/wordpress/commits/master) + +# wordpress +Bastille template to bootstrap Wordpress + +## Bootstrap +```shell +bastille bootstrap https://gitlab.com/bastillebsd-templates/wordpress +``` + +## Usage +```shell +bastille template TARGET bastillebsd-templates/wordpress +``` diff --git a/www/wordpress/root/bootstrap-wp.sh b/www/wordpress/root/bootstrap-wp.sh new file mode 100755 index 0000000..f2cc06c --- /dev/null +++ b/www/wordpress/root/bootstrap-wp.sh @@ -0,0 +1,24 @@ +#!/bin/sh +# (christer.edwards@gmail.com) +# bootstrap wordpress database and token + +## set random token string +BOOTSTRAP_TOKEN=$(openssl rand -hex 18) + +## copy config sample into place +cp /usr/local/www/wordpress/wp-config-sample.php /usr/local/www/wordpress/wp-config.php + +## find/replace magic +sed -i '' -e s#username_here#wpuser# \ + -e s#password_here#$BOOTSTRAP_TOKEN# \ + -e s#database_name_here#wordpress# \ + /usr/local/www/wordpress/wp-config.php + +sed -i '' 's/localhost/127.0.0.1/' /usr/local/www/wordpress/wp-config.php + +## import database +echo "CREATE DATABASE wordpress; CREATE USER wpuser@localhost IDENTIFIED BY +'$BOOTSTRAP_TOKEN'; GRANT ALL PRIVILEGES ON wordpress.* TO wpuser@localhost;" | mysql + +## cleanup +rm /root/bootstrap-wp.sh diff --git a/www/wordpress/usr/local/etc/nginx/nginx.conf b/www/wordpress/usr/local/etc/nginx/nginx.conf new file mode 100644 index 0000000..6c1218f --- /dev/null +++ b/www/wordpress/usr/local/etc/nginx/nginx.conf @@ -0,0 +1,41 @@ +user nobody; +worker_processes auto; +error_log /var/log/nginx/error.log; + +events { + worker_connections 1024; +} + +http { + include mime.types; + default_type application/octet-stream; + + access_log /var/log/nginx/access.log; + + sendfile on; + keepalive_timeout 65; + + server { + listen 80 default_server; + root /usr/local/www/wordpress; + index index.php; + + location / { + try_files $uri $uri/ /index.php?q=$uri&$args; + } + + error_page 500 502 503 504 /50x.html; + location = /50x.html { + root /usr/local/www/nginx-dist; + } + + location ~ \.php$ { + try_files $uri =404; + fastcgi_split_path_info ^(.+\.php)(/.+)$; + fastcgi_pass unix:/var/run/php-fpm.sock; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $request_filename; + include fastcgi_params; + } + } +} diff --git a/www/wordpress/usr/local/etc/php-fpm.d/www.conf b/www/wordpress/usr/local/etc/php-fpm.d/www.conf new file mode 100644 index 0000000..244e9db --- /dev/null +++ b/www/wordpress/usr/local/etc/php-fpm.d/www.conf @@ -0,0 +1,12 @@ +[www] +user = nobody +group = nobody +listen = /var/run/php-fpm.sock +listen.owner = nobody +listen.group = nobody + +pm = dynamic +pm.max_children = 5 +pm.start_servers = 2 +pm.min_spare_servers = 1 +pm.max_spare_servers = 3 diff --git a/www/yarn/LICENSE b/www/yarn/LICENSE new file mode 100644 index 0000000..f5cdce0 --- /dev/null +++ b/www/yarn/LICENSE @@ -0,0 +1,29 @@ +BSD 3-Clause License + +Copyright (c) 2019, Christer Edwards +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/www/yarn/PKG b/www/yarn/PKG new file mode 100644 index 0000000..6e2879e --- /dev/null +++ b/www/yarn/PKG @@ -0,0 +1 @@ +yarn diff --git a/www/yarn/README.md b/www/yarn/README.md new file mode 100644 index 0000000..34ab126 --- /dev/null +++ b/www/yarn/README.md @@ -0,0 +1,15 @@ +# Yarn +Bastille template to bootstrap Yarn + +## Status +[![pipeline status](https://gitlab.com/bastillebsd-templates/yarn/badges/master/pipeline.svg)](https://gitlab.com/bastillebsd-templates/yarn/commits/master) + +## Bootstrap +```shell +bastille bootstrap https://gitlab.com/bastillebsd-templates/yarn +``` + +## Usage +```shell +bastille template TARGET bastillebsd-templates/yarn +```