Compare commits

..

4 Commits

Author SHA1 Message Date
Kroese
2c44669d91 feat: Improve Codespaces configuration (#1079) 2025-10-17 13:25:02 +02:00
Kroese
175d90aad7 fix: Move order in entry file (#1078) 2025-10-17 13:04:03 +02:00
Kroese
e1e5f8f91d fix: Validate status messages (#1077) 2025-10-17 12:07:13 +02:00
Kroese
dff8abbe1e build: Validate JSON and YML files (#1076) 2025-10-17 10:05:52 +02:00
7 changed files with 34 additions and 14 deletions

View File

@@ -3,7 +3,8 @@ services:
container_name: dsm container_name: dsm
image: vdsm/virtual-dsm image: vdsm/virtual-dsm
environment: environment:
RAM_SIZE: "max" ALLOCATE: "Y"
RAM_SIZE: "half"
DISK_SIZE: "max" DISK_SIZE: "max"
CPU_CORES: "max" CPU_CORES: "max"
devices: devices:

View File

@@ -2,9 +2,7 @@
"name": "Virtual DSM", "name": "Virtual DSM",
"service": "dsm", "service": "dsm",
"containerEnv": { "containerEnv": {
"RAM_SIZE": "max", "ALLOCATE": "Y"
"DISK_SIZE": "max",
"CPU_CORES": "max"
}, },
"forwardPorts": [5000], "forwardPorts": [5000],
"portsAttributes": { "portsAttributes": {

View File

@@ -1,4 +1,5 @@
.dockerignore .dockerignore
.devcontainer
.git .git
.github .github
.gitignore .gitignore

View File

@@ -22,3 +22,8 @@ jobs:
dockerfile: Dockerfile dockerfile: Dockerfile
ignore: DL3008,DL3003,DL3006,DL3013 ignore: DL3008,DL3003,DL3006,DL3013
failure-threshold: warning failure-threshold: warning
-
name: Validate JSON and YML files
uses: GrantBirki/json-yaml-validate@v4
with:
yaml_exclude_regex: ".*\\kubernetes\\.yml$"

View File

@@ -18,8 +18,8 @@ cd /run
. proc.sh # Initialize processor . proc.sh # Initialize processor
. serial.sh # Initialize serialport . serial.sh # Initialize serialport
. power.sh # Configure shutdown . power.sh # Configure shutdown
. config.sh # Configure arguments
. memory.sh # Check available memory . memory.sh # Check available memory
. config.sh # Configure arguments
. finish.sh # Finish initialization . finish.sh # Finish initialization
trap - ERR trap - ERR

View File

@@ -1,16 +1,31 @@
#!/usr/bin/env bash #!/usr/bin/env bash
set -Eeuo pipefail set -Eeuo pipefail
lastmsg=""
path="/run/shm/msg.html" path="/run/shm/msg.html"
if [ -f "$path" ] && [ -s "$path" ]; then refresh() {
echo -n "s: " && cat "$path"
fi [ ! -f "$path" ] && return 0
[ ! -s "$path" ] && return 0
msg=$(< "$path")
msg="${msg%$'\n'}"
[ -z "$msg" ] && return 0
[[ "$msg" == "$lastmsg" ]] && return 0
lastmsg="$msg"
echo "s: $msg"
return 0
}
refresh
inotifywait -m "$path" | inotifywait -m "$path" |
while read -r fp event fn; do while read -r fp event fn; do
case "${event,,}" in case "${event,,}" in
"modify"* ) echo -n "s: " && cat "$path" ;; "modify"* ) refresh ;;
"delete_self" ) echo "c: vnc" ;; "delete_self" ) echo "c: vnc" ;;
esac esac
done done