refactor: use bubble instead

This commit is contained in:
iceBear67
2026-06-15 17:22:01 +08:00
parent ab9b4c7e13
commit 37d68dfcab
9 changed files with 47 additions and 381 deletions

View File

@@ -0,0 +1,17 @@
#!/bin/sh
# VARIABLES: _REVISION_ _REPO_
set -euo pipefail
mkdir -p /users && chown keeper /users && chmod 644 /users
su keeper
init_repo(){
git clone -b _REVISION_ _REPO_ /users
}
if [[ ! -d /users/.git ]]; then
init_repo
elif [[ -d /users && cd /users && ! git pull origin _REVISION_ ]]; then
init_repo
fi

View File

@@ -1,16 +0,0 @@
#!/bin/sh
mkdir -p /app
cd /app
rm -rf ./template ./snapshot
mkdir /app/template /app/snapshot
set -euo pipefail
git clone -b _REVISION_ _REPO_ template
python3 /daemon/orchestrate.py \
--root /app/template \
--network cloud \
--volume-parent /data/volumes \
--snapshot-root /app/snapshot

View File

@@ -0,0 +1,11 @@
#!/sbin/openrc-run
command="/usr/bin/auth-server"
command_background=true
command_args="-addr 0.0.0.0:8080 -root /users"
command_user="keeper"
pidfile="/run/${RC_SVCNAME}.pid"
depend() {
need net
}

10
image/overlay/etc/init.d/bubble Executable file
View File

@@ -0,0 +1,10 @@
#!/sbin/openrc-run
depend() {
need auth-server docker
}
command="/usr/bin/bubble"
command_args="-config /daemon/config.yaml"
pidfile="/run/${RC_SVCNAME}.pid"
command_background=true

View File

@@ -1,2 +1,2 @@
# min hour day month weekday command
*/15 * * * * /usr/bin/sh /daemon/update.sh
*/15 * * * * /usr/bin/sh /daemon/update-keys.sh