feat: initial upload

Initial public release
This commit is contained in:
Chris Blake 2024-05-19 14:04:59 -05:00
commit 85a5bd66e0
30 changed files with 943 additions and 0 deletions

View file

@ -0,0 +1,6 @@
deb http://ftp.us.debian.org/debian bookworm main contrib non-free-firmware
deb-src http://ftp.us.debian.org/debian bookworm main contrib non-free-firmware
deb http://ftp.us.debian.org/debian bookworm-updates main contrib non-free-firmware
deb-src http://ftp.us.debian.org/debian bookworm-updates main contrib non-free-firmware
deb http://security.debian.org/debian-security bookworm-security main
deb-src http://security.debian.org/debian-security bookworm-security main

View file

@ -0,0 +1,113 @@
# The top level settings are used as module
# and system configuration.
# A set of users which may be applied and/or used by various modules
# when a 'default' entry is found it will reference the 'default_user'
# from the distro configuration specified below
users:
- default
# If this is set, 'root' will not be able to ssh in and they
# will get a message to login instead as the default $user
disable_root: true
# This will cause the set+update hostname module to not operate (if true)
preserve_hostname: false
apt:
# This prevents cloud-init from rewriting apt's sources.list file,
# which has been a source of surprise.
preserve_sources_list: true
# If you use datasource_list array, keep array items in a single line.
# If you use multi line array, ds-identify script won't read array items.
# Example datasource config
# datasource:
# Ec2:
# metadata_urls: [ 'blah.com' ]
# timeout: 5 # (defaults to 50 seconds)
# max_wait: 10 # (defaults to 120 seconds)
# The modules that run in the 'init' stage
cloud_init_modules:
- migrator
- seed_random
- bootcmd
- write-files
- growpart
- resizefs
- disk_setup
- mounts
- set_hostname
- update_hostname
- update_etc_hosts
- ca-certs
- rsyslog
- users-groups
- ssh
# The modules that run in the 'config' stage
cloud_config_modules:
- snap
- ssh-import-id
- keyboard
- locale
- set-passwords
- grub-dpkg
- apt-pipelining
- apt-configure
- ntp
- timezone
- disable-ec2-metadata
- runcmd
- byobu
# The modules that run in the 'final' stage
cloud_final_modules:
- package-update-upgrade-install
- fan
- landscape
- lxd
- write-files-deferred
- puppet
- chef
- mcollective
- salt-minion
- reset_rmc
- refresh_rmc_and_interface
- rightscale_userdata
- scripts-vendor
- scripts-per-once
- scripts-per-boot
- scripts-per-instance
- scripts-user
- ssh-authkey-fingerprints
- keys-to-console
- install-hotplug
- phone-home
- final-message
- power-state-change
# System and/or distro specific settings
# (not accessible to handlers/transforms)
system_info:
# This will affect which distro class gets used
distro: debian
# Default user name + that default users groups (if added/used)
default_user:
name: debian
plain_text_passwd: 'debian'
lock_passwd: False
gecos: Debian
groups: [adm, audio, cdrom, dialout, dip, floppy, netdev, plugdev, sudo, video]
sudo: ["ALL=(ALL) NOPASSWD:ALL"]
shell: /bin/bash
# Other config here will be given to the distro class and/or path classes
paths:
cloud_dir: /var/lib/cloud/
templates_dir: /etc/cloud/templates/
package_mirrors:
- arches: [default]
failsafe:
primary: https://deb.debian.org/debian
security: https://deb.debian.org/debian-security
ssh_svcname: ssh

View file

@ -0,0 +1,15 @@
# configure cloud-init for None
datasource_list: [ None ]
datasource:
None:
metadata:
local-hostname: "unvr-nas"
userdata_raw: |
#cloud-config
hostname: unvr-nas
# Setup cmds for open media vault
runcmd:
- DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true apt-get install -f -y
- omv-confdbadm populate
- omv-salt deploy run hosts

View file

@ -0,0 +1,6 @@
# This is a configuration file for /etc/init.d/chrony and
# /lib/systemd/system/chrony.service; it allows you to pass various options to
# the chrony daemon without editing the init script or service file.
# Options to pass to chrony.
DAEMON_OPTS="-F 0"

View file

@ -0,0 +1,2 @@
/dev/boot1 /boot ext4 defaults 0 1
/dev/boot2 / ext4 defaults 0 1

View file

@ -0,0 +1,20 @@
#
# Configuration file for update-initramfs(8)
#
#
# update_initramfs [ yes | all | no ]
#
# Default is yes
# If set to all update-initramfs will update all initramfs
# If set to no disables any update to initramfs beside kernel upgrade
update_initramfs=no
#
# backup_initramfs [ yes | no ]
#
# Default is no
# If set to no leaves no .bak backup files.
backup_initramfs=no

View file

@ -0,0 +1 @@
en_US.UTF-8 UTF-8

View file

@ -0,0 +1,7 @@
# /etc/modules: kernel modules to load at boot time.
#
# This file contains the names of kernel modules that should be loaded
# at boot time, one per line. Lines beginning with "#" are ignored.
# Parameters can be specified after the module name.
ubnthal # used by ulcmd

View file

@ -0,0 +1,34 @@
# This file is part of systemd.
#
# systemd is free software; you can redistribute it and/or modify it under the
# terms of the GNU Lesser General Public License as published by the Free
# Software Foundation; either version 2.1 of the License, or (at your option)
# any later version.
#
# Entries in this file show the compile time defaults. Local configuration
# should be created by either modifying this file, or by creating "drop-ins" in
# the resolved.conf.d/ subdirectory. The latter is generally recommended.
# Defaults can be restored by simply deleting this file and all drop-ins.
#
# Use 'systemd-analyze cat-config systemd/resolved.conf' to display the full config.
#
# See resolved.conf(5) for details.
[Resolve]
# Some examples of DNS servers which may be used for DNS= and FallbackDNS=:
# Cloudflare: 1.1.1.1#cloudflare-dns.com 1.0.0.1#cloudflare-dns.com 2606:4700:4700::1111#cloudflare-dns.com 2606:4700:4700::1001#cloudflare-dns.com
# Google: 8.8.8.8#dns.google 8.8.4.4#dns.google 2001:4860:4860::8888#dns.google 2001:4860:4860::8844#dns.google
# Quad9: 9.9.9.9#dns.quad9.net 149.112.112.112#dns.quad9.net 2620:fe::fe#dns.quad9.net 2620:fe::9#dns.quad9.net
DNS=1.1.1.1#cloudflare-dns.com 1.0.0.1#cloudflare-dns.com 2606:4700:4700::1111#cloudflare-dns.com 2606:4700:4700::1001#cloudflare-dns.com
FallbackDNS=8.8.8.8#dns.google 8.8.4.4#dns.google 2001:4860:4860::8888#dns.google 2001:4860:4860::8844#dns.google
#Domains=
#DNSSEC=no
#DNSOverTLS=no
#MulticastDNS=yes
#LLMNR=yes
#Cache=yes
#CacheFromLocalhost=no
#DNSStubListener=yes
#DNSStubListenerExtra=
#ReadEtcHosts=yes
#ResolveUnicastSingleLabel=no

View file

@ -0,0 +1,13 @@
[Unit]
Description=Mock Unifi API to make ulcmd happy
[Service]
Type=simple
ExecStart=/usr/bin/mock-ubnt-api
KillMode=process
Restart=on-failure
RestartSec=2s
TimeoutStopSec=2s
[Install]
WantedBy=multi-user.target

View file

@ -0,0 +1,23 @@
#!/usr/bin/python3
from flask import Flask, jsonify
import socket
app = Flask(__name__)
@app.route('/api/info')
def api_info():
print(socket.gethostname())
payload = {
"isSetup": True,
"hostname": socket.gethostname(),
}
return jsonify(payload)
# No controllers for you
@app.route('/api/controllers')
def api_controllers():
payload = {}
return jsonify(payload)
if __name__ == '__main__':
app.run(host="0.0.0.0", port=11081)

View file

@ -0,0 +1,9 @@
#!/bin/bash
if [ "$1" == "poweroff" ]; then
poweroff
elif [ "$1" == "reboot" ]; then
reboot
else
echo "Unknown ubnt-systool cmd: $@" >> /tmp/ubnt-systool-unknown.log
fi