Add Oscam
This commit is contained in:
97
oscam/Dockerfile
Normal file
97
oscam/Dockerfile
Normal file
@@ -0,0 +1,97 @@
|
||||
ARG BUILD_FROM=ghcr.io/hassio-addons/base:12.2.2
|
||||
# hadolint ignore=DL3006
|
||||
FROM ${BUILD_FROM}
|
||||
|
||||
ARG OSCAM_VERSION
|
||||
|
||||
RUN \
|
||||
echo "**** install build packages ****" && \
|
||||
apk add --no-cache --virtual=build-dependencies \
|
||||
gcc \
|
||||
g++ \
|
||||
libusb-dev \
|
||||
linux-headers \
|
||||
make \
|
||||
openssl-dev \
|
||||
pcsc-lite-dev \
|
||||
subversion \
|
||||
tar \
|
||||
shadow
|
||||
|
||||
RUN \
|
||||
echo "**** install runtime packages ****" && \
|
||||
apk add --no-cache \
|
||||
ccid \
|
||||
curl \
|
||||
libcrypto1.1 \
|
||||
libssl1.1 \
|
||||
libusb \
|
||||
pcsc-lite \
|
||||
pcsc-lite-libs
|
||||
|
||||
RUN \
|
||||
echo "**** compile oscam ****" && \
|
||||
if [ -z ${OSCAM_VERSION+x} ]; then \
|
||||
OSCAM_VERSION=$(svn info --show-item revision https://svn.streamboard.tv/oscam/trunk ); \
|
||||
fi && \
|
||||
svn checkout https://svn.streamboard.tv/oscam/trunk@${OSCAM_VERSION} /tmp/oscam-svn && \
|
||||
cd /tmp/oscam-svn && \
|
||||
./config.sh \
|
||||
--enable all \
|
||||
--disable \
|
||||
CARDREADER_DB2COM \
|
||||
CARDREADER_INTERNAL \
|
||||
CARDREADER_STINGER \
|
||||
CARDREADER_STAPI \
|
||||
CARDREADER_STAPI5 \
|
||||
IPV6SUPPORT \
|
||||
LCDSUPPORT \
|
||||
LEDSUPPORT \
|
||||
READ_SDT_CHARSETS && \
|
||||
make \
|
||||
CONF_DIR=/config \
|
||||
DEFAULT_PCSC_FLAGS="-I/usr/include/PCSC" \
|
||||
NO_PLUS_TARGET=1 \
|
||||
OSCAM_BIN=/usr/bin/oscam \
|
||||
pcsc-libusb
|
||||
|
||||
RUN \
|
||||
echo "**** fix broken permissions from pcscd install ****" && \
|
||||
chown root:root \
|
||||
/usr/sbin/pcscd && \
|
||||
chmod 755 \
|
||||
/usr/sbin/pcscd
|
||||
|
||||
RUN \
|
||||
echo "**** install PCSC drivers ****" && \
|
||||
mkdir -p \
|
||||
/tmp/omnikey && \
|
||||
curl -o \
|
||||
/tmp/omnikey.tar.gz -L \
|
||||
https://www.hidglobal.com/sites/default/files/drivers/ifdokccid_linux_x86_64-v4.2.8.tar.gz && \
|
||||
tar xzf \
|
||||
/tmp/omnikey.tar.gz -C \
|
||||
/tmp/omnikey --strip-components=2 && \
|
||||
cd /tmp/omnikey && \
|
||||
./install
|
||||
|
||||
RUN \
|
||||
echo "**** fix group for card readers and add abc to dialout group ****" && \
|
||||
groupmod -g 24 cron && \
|
||||
groupmod -g 16 dialout
|
||||
|
||||
RUN \
|
||||
echo "**** cleanup ****" && \
|
||||
apk del --purge \
|
||||
build-dependencies && \
|
||||
rm -rf \
|
||||
/tmp/*
|
||||
|
||||
# copy local files
|
||||
COPY root/ /
|
||||
|
||||
# Ports and volumes
|
||||
EXPOSE 8888
|
||||
EXPOSE 9999
|
||||
|
||||
VOLUME /config
|
||||
24
oscam/config.json
Normal file
24
oscam/config.json
Normal file
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"name": "OSCAM",
|
||||
"version": "1.0",
|
||||
"slug": "oscam",
|
||||
"description": "This add-on allows you to have a OSCAM-Server.",
|
||||
"arch": ["armv7", "aarch64", "amd64"],
|
||||
"startup": "application",
|
||||
"boot": "auto",
|
||||
"init": false,
|
||||
"full_access": true,
|
||||
"privileged": ["NET_ADMIN", "SYS_ADMIN", "SYS_RAWIO", "SYS_TIME", "SYS_NICE"],
|
||||
"ports": {
|
||||
"8888/tcp": 8888,
|
||||
"9999/tcp": 9999
|
||||
},
|
||||
"ports_description": {
|
||||
"8888/tcp": "Web Interface",
|
||||
"9999/tcp": "OSCAM Server"
|
||||
},
|
||||
"map": [
|
||||
"config:rw"
|
||||
],
|
||||
"hassio_role": "default"
|
||||
}
|
||||
BIN
oscam/icon.png
Normal file
BIN
oscam/icon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 11 KiB |
12
oscam/root/defaults/oscam.conf
Normal file
12
oscam/root/defaults/oscam.conf
Normal file
@@ -0,0 +1,12 @@
|
||||
# oscam.conf generated automatically by Streamboard OSCAM 1.20-unstable_svn SVN r11268
|
||||
# Read more: http://www.streamboard.tv/svn/oscam/trunk/Distribution/doc/txt/oscam.conf.txt
|
||||
|
||||
[global]
|
||||
logfile = stdout
|
||||
|
||||
[cache]
|
||||
|
||||
|
||||
[webif]
|
||||
httpport = 8888
|
||||
httpallowed = 127.0.0.1,192.168.0.0-192.168.255.255,10.0.0.0-10.255.255.255,255.255.255.255
|
||||
13
oscam/root/etc/cont-init.d/30-config
Normal file
13
oscam/root/etc/cont-init.d/30-config
Normal file
@@ -0,0 +1,13 @@
|
||||
#!/usr/bin/with-contenv bash
|
||||
|
||||
# make folders
|
||||
mkdir -p \
|
||||
/config/oscam
|
||||
|
||||
# copy config
|
||||
#[[ ! -e /config/oscam/oscam.conf ]] && \
|
||||
# cp /defaults/oscam.conf /config/oscam/oscam.conf
|
||||
|
||||
# permissions
|
||||
#chown -R abc:abc \
|
||||
# /config
|
||||
2
oscam/root/etc/services.d/oscam/run
Normal file
2
oscam/root/etc/services.d/oscam/run
Normal file
@@ -0,0 +1,2 @@
|
||||
#!/usr/bin/with-contenv bash
|
||||
exec /usr/bin/oscam -c /config/oscam
|
||||
3
oscam/root/etc/services.d/pcscd/run
Normal file
3
oscam/root/etc/services.d/pcscd/run
Normal file
@@ -0,0 +1,3 @@
|
||||
#!/usr/bin/with-contenv bash
|
||||
exec \
|
||||
s6-setuidgid root /usr/sbin/pcscd -f
|
||||
Reference in New Issue
Block a user