diff --git a/fpmountd b/fpmountd new file mode 100755 index 0000000..bd3c1fc --- /dev/null +++ b/fpmountd @@ -0,0 +1,8 @@ +#!/sbin/openrc-run +supervisor="supervise-daemon" +command="/usr/local/bin/fpmountd" +pidfile="/run/${RC_SVCNAME}.pid" + +depend() { + need gamezip net +} diff --git a/setup.sh b/setup.sh index e2d138f..3d968f6 100755 --- a/setup.sh +++ b/setup.sh @@ -24,7 +24,7 @@ echo 'https://dl-cdn.alpinelinux.org/alpine/edge/main' >/etc/apk/repositories echo 'https://dl-cdn.alpinelinux.org/alpine/edge/community' >>/etc/apk/repositories echo 'https://dl-cdn.alpinelinux.org/alpine/edge/testing' >>/etc/apk/repositories apk update -apk add apache2 apache2-proxy php-apache2 fuse unionfs-fuse sudo libarchive libgcc libstdc++ +apk add apache2 apache2-proxy php-apache2 fuse unionfs-fuse libarchive libgcc libstdc++ sed -i 's/DEFAULT menu.c32/DEFAULT virt/g' /boot/extlinux.conf # boot directly into alpine # install dev dependencies @@ -35,11 +35,15 @@ apk add php-json php-openssl php-session php-pdo php-pdo_sqlite php-simplexml ph wget -O/tmp/vendor.tar https://github.com/FlashpointProject/svcomposer/releases/download/18c0ebd/vendor.tar tar -xvf /tmp/vendor.tar -C /var/www/localhost --exclude='vendor/silexlabs/amfphp/doc' -# Install fuse-archive - maybe better than avfs? +# Install fuse-archive git clone https://github.com/google/fuse-archive.git /tmp/fuse-archive cd /tmp/fuse-archive mkdir -p '/usr/local/sbin' -g++ -O3 src/main.cc `pkg-config libarchive fuse --cflags --libs` -o /usr/local/sbin/fuse-archive +g++ -O3 src/main.cc `pkg-config libarchive fuse --cflags --libs` -o "/usr/local/bin/fuse-archive" + +# Install fpmountd +wget -O "/usr/local/bin/fpmountd" "https://github.com/FlashpointProject/flashpointvm-mount-daemon/releases/download/e669fd4/flashpointvm-mount-daemon_i686-unknown-linux-musl_qemu" +chmod +x "/usr/local/bin/fpmountd" # install fuzzyfs git clone https://github.com/XXLuigiMario/fuzzyfs.git /tmp/fuzzyfs @@ -56,15 +60,17 @@ rm /var/www/localhost/htdocs/index.html # setup apache rc-update add apache2 default # run apache2 on startup -echo 'apache ALL=(ALL) NOPASSWD: ALL' >>/etc/sudoers cp /mnt/httpd.conf /etc/apache2/httpd.conf cp /mnt/mime.types /etc/apache2/mime.types # setup gamezip service -mkdir /root/.avfs cp /mnt/gamezip /etc/init.d rc-update add gamezip default +# setup fpmountd service +cp /mnt/fpmountd /etc/init.d +rc-update add fpmountd default + # modify apache2 service dependencies sed -i 's/need/need gamezip/' /etc/init.d/apache2 sed -i 's/after.*/after */' /etc/init.d/apache2