Skip to content

Commit

Permalink
Merge pull request #82 from soubinan/features
Browse files Browse the repository at this point in the history
Features
  • Loading branch information
soubinan authored and Soubinan committed Feb 15, 2025
2 parents 458ecfe + 659b868 commit 64f0433
Show file tree
Hide file tree
Showing 4 changed files with 111 additions and 18 deletions.
4 changes: 2 additions & 2 deletions __layout.k
Original file line number Diff line number Diff line change
Expand Up @@ -1039,7 +1039,7 @@ _welcome_msg_cron = """\
_welcome_msg_script = """\
#!/bin/bash

ports=$(ss -ptln "sport > :1023 or sport = :80 or sport = :443" | grep -vE 'systemd|127.0.0.|%lo|::1|Netid|Local|next-router' | awk '{print $4}' | awk -F: '{print $NF}' | sort -u)
ports=$(ss -ptln "sport > :1023 or sport = :80 or sport = :443" | grep -vE 'systemd|sshd|127.0.0.|%lo|::1|Netid|Local|next-router' | awk '{print $4}' | awk -F: '{print $NF}' | sort -u)
ips=$(ip a|grep 'inet '|grep -v '127.0.0'|awk '{print $2}')

printf '\\n'
Expand All @@ -1055,7 +1055,7 @@ printf '| %-10s | %-20s |\\n' 'Ports' 'Process'
printf '+------------+----------------------+\\n'

while read -r port; do
application=$(ss -lptn "sport == :$port" | grep -vE 'Netid|Local' | awk '{print $6}' | cut -d'"' -f2)
application=$(ss -lptn "sport == :$port" | grep -vE 'systemd|sshd|Netid|Local' | awk '{print $6}' | cut -d'"' -f2)
printf '| %-10s | %-20s |\\n' $port $application
done <<< $ports

Expand Down
2 changes: 1 addition & 1 deletion templates/bunkerweb.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ instructions:
export UI_WIZARD=1
curl -s https://repo.bunkerweb.io/install/script.deb.sh | bash
apt install -y bunkerweb={{image.serial}}
apt -E install -y bunkerweb={{image.serial}}
apt-mark hold nginx bunkerweb
systemctl disable nginx.service
Expand Down
99 changes: 99 additions & 0 deletions templates/homepage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
metadata:
name: Homepage
get_version_command: curl -s https://api.github.com/repos/gethomepage/homepage/releases/latest | jq -r '.tag_name'
description: A highly customizable homepage (or startpage / application dashboard) with Docker and service API integrations.
categories: Homepage
project_source: https://github.com/gethomepage/homepage
distribution: debian
release: bookworm
architectures:
- amd64
instructions:
files:
- path: /opt/homepage/settings.env
generator: dump
mode: "0440"
content: |-
PORT=3000
NEXT_TELEMETRY_DISABLED=1
NODE_ENV="production"
NODE_OPTIONS="--no-experimental-fetch"
HOSTNAME="127.0.0.1"
DEFAULT_COLOR_SCHEME="dark"
- path: /etc/systemd/system/homepage.service
generator: dump
mode: "0440"
content: |-
[Unit]
Description=homepage Dashboard
After=network.target
ConditionPathExists=/app/.installed__
[Service]
Type=simple
WorkingDirectory=/app
EnvironmentFile=/opt/homepage/settings.env
PIDFile=homepage.pid
ExecStart=/usr/bin/pnpm start
Restart=always
[Install]
WantedBy=multi-user.target
packages:
- git
- nodejs

repositories:
- name: nodejs
url: |-
deb http://deb.nodesource.com/node_20.x nodistro main
key: |-
-----BEGIN PGP PUBLIC KEY BLOCK-----
mQENBFdDN1ABCADaNd/I3j3tn40deQNgz7hB2NvT+syXe6k4ZmdiEcOfBvFrkS8B
hNS67t93etHsxEy7E0qwsZH32bKazMqe9zDwoa3aVImryjh6SHC9lMtW27JPHFeM
Srkt9YmH1WMwWcRO6eSY9B3PpazquhnvbammLuUojXRIxkDroy6Fw4UKmUNSRr32
9Ej87jRoR1B2/57Kfp2Y4+vFGGzSvh3AFQpBHq51qsNHALU6+8PjLfIt+5TPvaWR
TB+kAZnQZkaIQM2nr1n3oj6ak2RATY/+kjLizgFWzgEfbCrbsyq68UoY5FPBnu4Z
E3iDZpaIqwKr0seUC7iA1xM5eHi5kty1oB7HABEBAAG0Ik5Tb2xpZCA8bnNvbGlk
LWdwZ0Bub2Rlc291cmNlLmNvbT6JATgEEwECACIFAldDN1ACGwMGCwkIBwMCBhUI
AgkKCwQWAgMBAh4BAheAAAoJEC9ZtfmbG+C0y7wH/i4xnab36dtrYW7RZwL8i6Sc
NjMx4j9+U1kr/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p6MBa
=MARt
-----END PGP PUBLIC KEY BLOCK-----
actions:
- trigger: post-files
pongo: true
action: |-
#!/bin/bash
set -eux
git clone https://github.com/gethomepage/homepage -b v{{ image.serial }} --depth 1 /app
cd /app
npm install -g pnpm
pnpm install
NODE_ENV=production pnpm build
touch .installed__
systemctl enable homepage.service
24 changes: 9 additions & 15 deletions templates/mafl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ instructions:
PORT=3000
NEXT_TELEMETRY_DISABLED=1
NODE_ENV="production"
NODE_OPTIONS="--no-experimental-fetch"
HOSTNAME="127.0.0.1"
DEFAULT_COLOR_SCHEME="dark"
- path: /etc/systemd/system/mafl.service
Expand All @@ -28,14 +26,14 @@ instructions:
[Unit]
Description=mafl Dashboard
After=network.target
ConditionPathExists=/opt/mafl/.installed__
ConditionPathExists=/app/.installed__
[Service]
Type=simple
WorkingDirectory=/opt/mafl
WorkingDirectory=/app/.output
EnvironmentFile=/opt/mafl/settings.env
PIDFile=/opt/mafl/mafl.pid
ExecStart=/usr/bin/node /opt/mafl/server/index.mjs
ExecStart=/usr/bin/node ./server/index.mjs
Restart=always
[Install]
Expand Down Expand Up @@ -87,21 +85,17 @@ instructions:
#!/bin/bash
set -eux
git clone https://github.com/hywax/mafl -b v{{ image.serial }} --depth 1 /tmp/mafl
git clone https://github.com/hywax/mafl -b v{{ image.serial }} --depth 1 /app
cd /tmp/mafl
cd /app
rm yarn.lock
npm install -g yarn
npx @nuxt/telemetry disable
yarn install --non-interactive
yarn run build
NODE_ENV=production yarn run build
mkdir -p data
cp .example/config.yml data/config.yml
mkdir -p /opt/mafl/extra /opt/mafl/data /app/data
cp -r .output/* /opt/mafl/
cp .example/config.yml /opt/mafl/data/config.yml
cp .example/config.yml /app/data/config.yml
cp extra/healthcheck.mjs /opt/mafl/extra/healthcheck.mjs
touch /opt/mafl/.installed__
touch .installed__
systemctl enable mafl.service

0 comments on commit 64f0433

Please sign in to comment.