Skip to content
This repository has been archived by the owner on May 8, 2024. It is now read-only.

Commit

Permalink
Merge pull request #2571 from NeoTheFox/simple-http-server
Browse files Browse the repository at this point in the history
Simple http server service fix for emulationstation
  • Loading branch information
fewtarius authored Dec 23, 2023
2 parents 6a8cf1a + 0fb362f commit 3dd24b7
Show file tree
Hide file tree
Showing 12 changed files with 78 additions and 0 deletions.
1 change: 1 addition & 0 deletions config/show_config
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ show_config() {
config_message="${config_message}\n - SAMBA mounting support:\t\t $SAMBA_SUPPORT"
config_message="${config_message}\n - SAMBA server support:\t\t $SAMBA_SERVER"
config_message="${config_message}\n - SFTP server support:\t\t\t $SFTP_SERVER"
config_message="${config_message}\n - HTTP server support:\t\t\t $SIMPLE_HTTP_SERVER"
config_message="${config_message}\n - OpenVPN support:\t\t\t $OPENVPN_SUPPORT"
config_message="${config_message}\n - WireGuard support:\t\t\t $WIREGUARD_SUPPORT"
config_message="${config_message}\n - ZeroTier support:\t\t\t $ZEROTIER_SUPPORT"
Expand Down
3 changes: 3 additions & 0 deletions distributions/JELOS/options
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,9 @@
# build and install SFTP Server (yes / no)
SFTP_SERVER="yes"

# build and install Simple HTTP Server (yes / no)
SIMPLE_HTTP_SERVER="no"

# build and install OpenVPN support (yes / no)
OPENVPN_SUPPORT="no"

Expand Down
35 changes: 35 additions & 0 deletions packages/network/simple-http-server/package.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Copyright (C) 2023 JELOS (https://github.com/JustEnoughLinuxOS)
# Copyright (C) 2023-present NeoTheFox (https://github.com/NeoTheFox)

PKG_NAME="simple-http-server"
PKG_VERSION="0.6.7"
PKG_LICENSE="MIT"
PKG_SITE="https://github.com/TheWaWaR/simple-http-server"
PKG_DEPENDS_TARGET="toolchain"
PKG_LONGDESC="Simple http server in Rust"
PKG_TOOLCHAIN="manual"

case ${ARCH} in
x86_64)
PKG_URL="${PKG_SITE}/releases/download/v${PKG_VERSION}/x86_64-unknown-linux-musl-simple-http-server"
;;
arm)
PKG_URL="${PKG_SITE}/releases/download/v${PKG_VERSION}/armv7-unknown-linux-musleabihf-simple-http-server"
;;
aarch64)
PKG_URL="${PKG_SITE}/releases/download/v${PKG_VERSION}/aarch64-unknown-linux-musl-simple-http-server"
;;
esac

unpack() {
mkdir -p ${PKG_BUILD}
cp ${SOURCES}/${PKG_NAME}/${PKG_NAME}-${PKG_VERSION}.${ARCH}*${PKG_NAME} ${PKG_BUILD}/simple-http-server
}

makeinstall_target() {
mkdir -p ${INSTALL}/usr/bin
install -Dm755 ${PKG_BUILD}/simple-http-server ${INSTALL}/usr/bin

mkdir -p ${INSTALL}/usr/lib/systemd/system
install -Dm644 ${PKG_DIR}/system.d/simple-http-server.service ${INSTALL}/usr/lib/systemd/system
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[Unit]
Description=simple-http-server
Wants=network-pre.target
After=network-pre.target

[Service]
ExecStart=/usr/bin/bash -c "source /etc/profile.d/001-functions && /usr/bin/simple-http-server -i -p 80 -a root:$(get_setting root.password) -s -u /storage"
Restart=always
KillMode=process
Restart=on-failure
RestartSec=10

[Install]
WantedBy=multi-user.target
4 changes: 4 additions & 0 deletions packages/virtual/network/package.mk
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ if [ "${SAMBA_SERVER}" = "yes" ] || [ "$SAMBA_SUPPORT" = "yes" ]; then
PKG_DEPENDS_TARGET="${PKG_DEPENDS_TARGET} samba"
fi

if [ "${SIMPLE_HTTP_SERVER}" = "yes" ]; then
PKG_DEPENDS_TARGET="${PKG_DEPENDS_TARGET} simple-http-server"
fi

if [ "${OPENVPN_SUPPORT}" = "yes" ]; then
PKG_DEPENDS_TARGET="${PKG_DEPENDS_TARGET} openvpn"
fi
Expand Down
3 changes: 3 additions & 0 deletions projects/Amlogic/devices/S922X/options
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,9 @@
# build and install SFTP Server (yes / no)
SFTP_SERVER="yes"

# build and install Simple HTTP Server (yes / no)
SIMPLE_HTTP_SERVER="yes"

# build and install OpenVPN support (yes / no)
OPENVPN_SUPPORT="no"

Expand Down
3 changes: 3 additions & 0 deletions projects/PC/devices/AMD64/options
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,9 @@
# build and install SFTP Server (yes / no)
SFTP_SERVER="yes"

# build and install Simple HTTP Server (yes / no)
SIMPLE_HTTP_SERVER="yes"

# build and install OpenVPN support (yes / no)
OPENVPN_SUPPORT="no"

Expand Down
3 changes: 3 additions & 0 deletions projects/Rockchip/devices/RK3326/options
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,9 @@
# build and install SFTP Server (yes / no)
SFTP_SERVER="yes"

# build and install Simple HTTP Server (yes / no)
SIMPLE_HTTP_SERVER="yes"

# build and install OpenVPN support (yes / no)
OPENVPN_SUPPORT="no"

Expand Down
3 changes: 3 additions & 0 deletions projects/Rockchip/devices/RK3399/options
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,9 @@
# build and install SFTP Server (yes / no)
SFTP_SERVER="yes"

# build and install Simple HTTP Server (yes / no)
SIMPLE_HTTP_SERVER="yes"

# build and install OpenVPN support (yes / no)
OPENVPN_SUPPORT="no"

Expand Down
3 changes: 3 additions & 0 deletions projects/Rockchip/devices/RK3566-X55/options
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,9 @@
# build and install SFTP Server (yes / no)
SFTP_SERVER="yes"

# build and install Simple HTTP Server (yes / no)
SIMPLE_HTTP_SERVER="yes"

# build and install OpenVPN support (yes / no)
OPENVPN_SUPPORT="no"

Expand Down
3 changes: 3 additions & 0 deletions projects/Rockchip/devices/RK3566/options
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,9 @@
# build and install SFTP Server (yes / no)
SFTP_SERVER="yes"

# build and install Simple HTTP Server (yes / no)
SIMPLE_HTTP_SERVER="yes"

# build and install OpenVPN support (yes / no)
OPENVPN_SUPPORT="no"

Expand Down
3 changes: 3 additions & 0 deletions projects/Rockchip/devices/RK3588/options
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,9 @@
# build and install SFTP Server (yes / no)
SFTP_SERVER="yes"

# build and install Simple HTTP Server (yes / no)
SIMPLE_HTTP_SERVER="yes"

# build and install OpenVPN support (yes / no)
OPENVPN_SUPPORT="no"

Expand Down

0 comments on commit 3dd24b7

Please sign in to comment.