add ca service
This commit is contained in:
parent
ca5d4c4b72
commit
8bbf7d31a5
10 changed files with 87 additions and 3 deletions
4
bin/admin/certbot-cert
Normal file
4
bin/admin/certbot-cert
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
#/usr/bin/env bash
|
||||
|
||||
certbot certonly --manual --preferred-challenges=dns -d "*.gurgul.org" -d "gurgul.org"
|
||||
|
||||
21
bin/admin/install-idf
Normal file
21
bin/admin/install-idf
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
if [ -z "$SUDO_USER" ]; then
|
||||
echo "This script must be run within sudo."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# from says ~/esp
|
||||
ESP=/pkg/esp
|
||||
|
||||
apt-get install git wget flex bison gperf python3 python3-pip python3-venv cmake ninja-build ccache libffi-dev libssl-dev dfu-util libusb-1.0-0
|
||||
|
||||
sudo -u "$SUDO_USER" bash <<EOF
|
||||
mkdir -p $ESP
|
||||
cd $ESP
|
||||
git clone -b v5.4.1 --recursive https://github.com/espressif/esp-idf.git
|
||||
|
||||
cd "$ESP/esp-idf"
|
||||
export IDF_TOOLS_PATH="$ESP/esp-idf/.espressif"
|
||||
./install.sh esp32,esp32c2,esp32c3,esp32c5,esp32c6,esp32c61,esp32h2,esp32p4,esp32s2,esp32s3
|
||||
|
||||
EOF
|
||||
|
||||
2
bin/admin/install-idf-enable
Normal file
2
bin/admin/install-idf-enable
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
export IDF_TOOLS_PATH="/pkg/esp/esp-idf/.espressif"
|
||||
. /pkg/esp/esp-idf/export.sh
|
||||
6
bin/services/ca/Gemfile
Normal file
6
bin/services/ca/Gemfile
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
source "https://rubygems.org"
|
||||
|
||||
ruby ">= 3.0"
|
||||
gem "roda"
|
||||
gem "puma"
|
||||
gem "rackup"
|
||||
26
bin/services/ca/Gemfile.lock
Normal file
26
bin/services/ca/Gemfile.lock
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
GEM
|
||||
remote: https://rubygems.org/
|
||||
specs:
|
||||
nio4r (2.7.4)
|
||||
puma (6.6.1)
|
||||
nio4r (~> 2.0)
|
||||
rack (3.2.0)
|
||||
rackup (2.2.1)
|
||||
rack (>= 3)
|
||||
roda (3.95.0)
|
||||
rack
|
||||
|
||||
PLATFORMS
|
||||
arm64-darwin-24
|
||||
ruby
|
||||
|
||||
DEPENDENCIES
|
||||
puma
|
||||
rackup
|
||||
roda
|
||||
|
||||
RUBY VERSION
|
||||
ruby 3.4.5p51
|
||||
|
||||
BUNDLED WITH
|
||||
2.6.9
|
||||
12
bin/services/ca/app.rb
Normal file
12
bin/services/ca/app.rb
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
require "roda"
|
||||
|
||||
class App < Roda
|
||||
# automatically sets application/json and encodes Ruby objects
|
||||
plugin :json
|
||||
|
||||
route do |r|
|
||||
r.get "hello" do
|
||||
{ message: "world" }
|
||||
end
|
||||
end
|
||||
end
|
||||
2
bin/services/ca/config.ru
Normal file
2
bin/services/ca/config.ru
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
require_relative "app"
|
||||
run App.freeze.app
|
||||
0
bin/services/ca/make
Executable file
0
bin/services/ca/make
Executable file
9
bin/services/ca/readme.md
Normal file
9
bin/services/ca/readme.md
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
|
||||
bundle exec rackup -p 9292 -o 0.0.0.0
|
||||
|
||||
|
||||
|
||||
RACK_ENV=production bundle exec rackup -p 8080 -o 0.0.0.0
|
||||
|
||||
|
||||
curl http://0.0.0.0:9292/hello --verbose
|
||||
8
bin/ssl
8
bin/ssl
|
|
@ -17,9 +17,11 @@ subcommand = ARGV.shift&.to_sym
|
|||
arg1 = ARGV[0] && ARGV[0] !~ /^-/ ? ARGV.shift : nil
|
||||
arg2 = ARGV[0] && ARGV[0] !~ /^-/ ? ARGV.shift : nil
|
||||
|
||||
$domains = ["mediacenter.lan"]
|
||||
$ips = ["192.168.0.94"]
|
||||
|
||||
# $domains = ["mediacenter.lan"]
|
||||
# $ips = ["192.168.0.94"]
|
||||
$domains = ["testing.self"]
|
||||
$ips = ["127.0.0.2"]
|
||||
$ips = []
|
||||
|
||||
### Setting up for client
|
||||
$cn = $domains.first
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue