Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions fpmountd
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/sbin/openrc-run
supervisor="supervise-daemon"
command="/usr/local/bin/fpmountd"
pidfile="/run/${RC_SVCNAME}.pid"

depend() {
need gamezip net
}
16 changes: 11 additions & 5 deletions setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -56,7 +60,6 @@ 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
sed -i 's/#LoadModule rewrite_module/LoadModule rewrite_module/g' /etc/apache2/httpd.conf
sed -i 's/AllowOverride None/AllowOverride All/g' /etc/apache2/httpd.conf
sed -i 's/DirectoryIndex index.html/DirectoryIndex index.html index.htm index.php/g' /etc/apache2/httpd.conf
Expand All @@ -78,10 +81,13 @@ sed -i 's/exe dll com bat msi/exe dll bat msi/g' /etc/apache2/mime.types
sed -i 's|application/vnd.lotus-organizer|# application/vnd.lotus-organizer|g' /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
Expand Down