diff --git a/apkovl/etc/apk/world b/apkovl/etc/apk/world index 222f2dc..5534b63 100644 --- a/apkovl/etc/apk/world +++ b/apkovl/etc/apk/world @@ -1,5 +1,4 @@ alpine-base i2c-tools openssh -rsync wpa_supplicant diff --git a/apkovl/etc/init.d/megabit b/apkovl/etc/init.d/megabit deleted file mode 100755 index 93e0760..0000000 --- a/apkovl/etc/init.d/megabit +++ /dev/null @@ -1,4 +0,0 @@ -#!/sbin/openrc-run -name=megabit -command="/usr/local/bin/megabit" -pidfile="/var/run/megabit.pid" diff --git a/apkovl/etc/init.d/megabit-sync b/apkovl/etc/init.d/megabit-sync deleted file mode 100755 index 38a6785..0000000 --- a/apkovl/etc/init.d/megabit-sync +++ /dev/null @@ -1,11 +0,0 @@ -#!/sbin/openrc-run -name=megabit-sync -command="/usr/local/bin/megabit-sync" -pidfile="/var/run/megabit-sync.pid" - -start_pre() { - mkdir -p /mnt/tmp - mount /usr/share/megabit/tmp.img /mnt/tmp - modprobe -r g_acm_ms - modprobe g_acm_ms file=/usr/share/megabit/tmp.img -} diff --git a/apkovl/etc/modprobe.d/g_mass_storage.conf b/apkovl/etc/modprobe.d/g_mass_storage.conf new file mode 100644 index 0000000..cf8ee44 --- /dev/null +++ b/apkovl/etc/modprobe.d/g_mass_storage.conf @@ -0,0 +1 @@ +options g_mass_storage file=/dev/mmcblk0p1 diff --git a/apkovl/etc/modules-load.d/g_mass_storage.conf b/apkovl/etc/modules-load.d/g_mass_storage.conf new file mode 100644 index 0000000..fd5ae93 --- /dev/null +++ b/apkovl/etc/modules-load.d/g_mass_storage.conf @@ -0,0 +1 @@ +g_mass_storage diff --git a/apkovl/etc/runlevels/default/megabit b/apkovl/etc/runlevels/default/megabit deleted file mode 120000 index fb1ac2b..0000000 --- a/apkovl/etc/runlevels/default/megabit +++ /dev/null @@ -1 +0,0 @@ -/etc/init.d/megabit \ No newline at end of file diff --git a/apkovl/etc/runlevels/default/megabit-sync b/apkovl/etc/runlevels/default/megabit-sync deleted file mode 120000 index e38d827..0000000 --- a/apkovl/etc/runlevels/default/megabit-sync +++ /dev/null @@ -1 +0,0 @@ -/etc/init.d/megabit-sync \ No newline at end of file diff --git a/apkovl/usr/local/bin/megabit b/apkovl/usr/local/bin/megabit deleted file mode 100755 index 1e20220..0000000 --- a/apkovl/usr/local/bin/megabit +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh -export NODE_PATH=$(npm root -g) -nodemon --delay 1 --watch /tmp --signal SIGTERM --exec 'node /tmp/index.js || true' & -echo $! > /var/run/megabit.pid diff --git a/apkovl/usr/local/bin/megabit-sync b/apkovl/usr/local/bin/megabit-sync deleted file mode 100755 index 9aa4cc3..0000000 --- a/apkovl/usr/local/bin/megabit-sync +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh -nodemon --delay 1 --watch /usr/share/megabit/tmp.img --signal SIGTERM --exec 'umount /mnt/tmp; mount /usr/share/megabit/tmp.img /mnt/tmp; rsync -a --delete --exclude=node_modules/ /mnt/tmp/ /tmp/' & -echo $! > /var/run/megabit-sync.pid diff --git a/compose.yml b/compose.yml index adbe6de..c5b98a2 100644 --- a/compose.yml +++ b/compose.yml @@ -15,9 +15,8 @@ services: - ./dist/overlay.img:/overlay.img privileged: true command: | - sh -exc ' + sh -c ' mkdir -p /mnt/overlay - mount -a - apk add g++ linux-headers make nodejs npm python3 - npm install -g megabit nodemon + mount -a \ + && apk add g++ linux-headers make nodejs npm python3 '