1
0
mirror of synced 2025-12-17 04:52:15 +01:00

Compare commits

...

73 Commits

Author SHA1 Message Date
d-two
acd60dbeb4 Update Dockerfile 2024-11-15 00:02:05 +01:00
d-two
3b9d465ae4 Delete baikal/Plugin.php 2024-11-15 00:01:47 +01:00
d-two
edba879ba3 Update config.yaml 2024-11-15 00:01:34 +01:00
d-two
5098cb39cc Update config.yaml 2024-11-14 23:30:26 +01:00
d-two
4cbfe8b05f Update config.yaml 2024-11-14 23:17:16 +01:00
d-two
b6b03b7ec7 Add files via upload 2024-11-14 23:15:36 +01:00
d-two
37bba6abff Update Dockerfile 2024-11-14 23:15:05 +01:00
d-two
d16fbbcc85 Update config.yaml 2024-11-14 22:50:40 +01:00
d-two
dd69e0fbcc Update Dockerfile 2024-11-14 22:50:08 +01:00
d-two
f4e712fb40 Update config.yaml 2024-11-14 21:31:46 +01:00
d-two
2d3ac51b1f Delete baikal/rootfs/var/www/baikal/vendor/sabre/dav/lib/CalDAV/Plugin.php 2024-11-14 21:31:05 +01:00
d-two
d18a54c4f2 Add files via upload 2024-11-14 21:30:27 +01:00
d-two
820f43f74c Create Plugin.php 2024-11-08 21:41:16 +01:00
d-two
b70ccb6e4c Update config.yaml 2024-10-18 22:31:24 +02:00
d-two
a65790654e Update direct.disabled 2024-10-18 22:31:14 +02:00
d-two
5c9813fb64 Update direct-ssl.disabled 2024-10-18 22:31:02 +02:00
d-two
d79eb93b0b Update config.yaml 2024-10-18 22:28:36 +02:00
d-two
c41c3a4853 Update direct-ssl.disabled 2024-10-18 22:28:21 +02:00
d-two
8bd1fba2bb Update direct.disabled 2024-10-18 22:28:10 +02:00
d-two
491fe7d044 Update config.yaml 2024-10-18 22:20:15 +02:00
d-two
ce61f979e1 Update config.yaml 2024-10-18 22:16:56 +02:00
d-two
e18164f6f6 Update direct-ssl.disabled 2024-10-18 22:16:43 +02:00
d-two
4487382823 Update config.yaml 2024-10-18 22:14:26 +02:00
d-two
3c393bec89 Update direct.disabled 2024-10-18 22:14:11 +02:00
d-two
74372151be Update direct-ssl.disabled 2024-10-18 22:13:58 +02:00
d-two
0b03b9fece Update direct-ssl.disabled 2024-10-18 22:12:30 +02:00
d-two
c26bbe0f03 Update config.yaml 2024-10-18 22:11:19 +02:00
d-two
667afdabe2 Update direct.disabled 2024-10-18 22:11:00 +02:00
d-two
f76c2545ea Update README.md 2024-10-16 11:54:30 +02:00
d-two
08f7c2a48f Update config.json 2024-09-05 23:43:19 +02:00
d-two
344ef81bf7 Update config.json 2024-09-05 23:41:19 +02:00
d-two
b6a9e9ba86 Update config.json 2024-09-05 23:38:48 +02:00
d-two
17cfa83619 Update config.json 2024-09-05 23:36:26 +02:00
d-two
f8ffaa65ed Update config.json 2024-09-05 23:35:31 +02:00
d-two
83de8acae7 fix config.json 2024-09-05 23:13:31 +02:00
d-two
a193c86b1e Update config.json 2024-09-05 13:12:14 +02:00
d-two
3bf357b62b Update config.json 2024-09-05 13:01:03 +02:00
d-two
45cef18bdf Update Dockerfile 2024-09-05 13:00:51 +02:00
d-two
4f775d68bc Update Dockerfile 2024-09-05 12:56:09 +02:00
d-two
1aad2ca792 Update Dockerfile 2024-09-05 12:53:54 +02:00
d-two
23fa7fd556 Update Dockerfile 2024-09-05 12:48:31 +02:00
d-two
494d7268d9 Update Dockerfile 2024-09-05 12:42:55 +02:00
d-two
cb40c0d618 Update config.json 2024-09-05 12:37:40 +02:00
d-two
5fe3e36c66 Update Dockerfile 2024-09-05 12:37:26 +02:00
d-two
2a6f6639a1 Update config.yaml 2024-09-05 12:33:34 +02:00
d-two
f2d9eda4d2 Update config.yaml 2024-09-05 12:32:20 +02:00
d-two
ab9ca84926 Rename www.conf to www.conf 2024-09-05 12:31:57 +02:00
d-two
52e5b7836f Update config.yaml 2024-09-05 12:25:34 +02:00
d-two
3b79e49c0c Update run 2024-09-05 12:25:11 +02:00
d-two
b198d9c0c4 Update config.yaml 2024-09-05 12:23:08 +02:00
d-two
8d99bf16b5 Update Dockerfile 2024-09-05 12:22:46 +02:00
d-two
f5a3844da5 Update Dockerfile 2024-03-22 08:06:54 +01:00
d-two
e5e6fc5480 Update Baikal to 0.9.5 2024-03-22 08:03:14 +01:00
d-two
bb294402ca Update Baikal to 0.9.5 2024-03-22 08:02:51 +01:00
d-two
d012519c70 Merge pull request #3 from brefra/download_fix
Fix download omnikey driver
2023-10-26 22:14:30 +02:00
d-two
76d80e3286 Update config.yaml 2023-10-26 22:11:20 +02:00
d-two
413b0467ec Update config.yaml 2023-10-26 22:10:59 +02:00
Frank
7ef32c197e Update download link omnikey driver
Update download link to local file of github repository
2023-10-16 21:06:59 +02:00
Frank
c257657155 Add omnikey download file 2023-10-16 21:04:37 +02:00
d-two
521e121948 Update config.yaml 2023-08-31 13:47:09 +02:00
d-two
7cdd7d2f49 Update run 2023-08-31 13:36:58 +02:00
d-two
2634460f63 Update config.yaml 2023-08-29 23:25:06 +02:00
d-two
4b5ec738c0 Update Dockerfile 2023-08-29 23:24:45 +02:00
d-two
6ca68bd22e Update README.md 2023-08-29 23:00:17 +02:00
d-two
2bf6d7c144 ps3netsrv-nas 2023-08-29 22:58:01 +02:00
d-two
92ef631667 Delete ps3netsrv directory 2023-08-29 22:57:09 +02:00
d-two
f256f5141f Delete 50-gid-video 2023-04-20 17:30:33 +02:00
d-two
93784d40e4 Update Dockerfile 2023-04-20 15:11:49 +02:00
d-two
d7150db9b5 Update Dockerfile 2023-04-20 14:28:51 +02:00
d-two
8c95c9816e Update Dockerfile 2023-04-20 14:27:26 +02:00
d-two
2c2f292b5f Update Dockerfile 2023-04-20 14:25:08 +02:00
d-two
bacf376179 Update Dockerfile 2023-04-20 14:20:27 +02:00
d-two
e59cef676a Update Dockerfile 2023-04-20 14:17:34 +02:00
16 changed files with 306 additions and 83 deletions

View File

@@ -5,26 +5,26 @@ FROM ${BUILD_FROM}
# Set shell # Set shell
SHELL ["/bin/bash", "-o", "pipefail", "-c"] SHELL ["/bin/bash", "-o", "pipefail", "-c"]
ENV VERSION 0.9.3 ENV VERSION 0.10.1
# Setup base # Setup base
# hadolint ignore=DL3003 # hadolint ignore=DL3003
RUN \ RUN \
apk add --no-cache \ apk add --no-cache \
nginx=1.22.1-r0 \ nginx \
php8-curl=8.0.26-r0 \ php81-curl \
php8-fpm=8.0.26-r0 \ php81-fpm \
php8-mbstring=8.0.26-r0 \ php81-mbstring \
php8-xml=8.0.26-r0 \ php81-xml \
php8=8.0.26-r0 \ php81 \
php8-sqlite3=8.0.26-r0 \ php81-sqlite3 \
php8-pdo=8.0.26-r0 \ php81-pdo \
php8-pdo_mysql=8.0.26-r0 \ php81-pdo_mysql \
php8-pdo_sqlite=8.0.26-r0 \ php81-pdo_sqlite \
php8-session=8.0.26-r0 \ php81-session \
php8-dom=8.0.26-r0 \ php81-dom \
php8-xmlreader=8.0.26-r0 \ php81-xmlreader \
php8-xmlwriter=8.0.26-r0 \ php81-xmlwriter \
\ \
&& curl -Ls "https://github.com/sabre-io/Baikal/releases/download/$VERSION/baikal-$VERSION.zip" -o baikal-$VERSION.zip \ && curl -Ls "https://github.com/sabre-io/Baikal/releases/download/$VERSION/baikal-$VERSION.zip" -o baikal-$VERSION.zip \
&& unzip -q baikal-$VERSION.zip -d /var/www/ \ && unzip -q baikal-$VERSION.zip -d /var/www/ \

View File

@@ -1,10 +1,10 @@
--- ---
name: Baikal name: Baikal
slug: baikal slug: baikal
version: 0.9.3 version: 0.10.1
description: Baikal is a Cal and CardDAV server, based on sabre/dav, that includes an administrative interface for easy management. description: Baikal is a Cal and CardDAV server, based on sabre/dav, that includes an administrative interface for easy management.
url: https://github.com/d-two/hassio-addons url: https://github.com/d-two/hassio-addons
startup: application startup: services
init: false init: false
webui: "[PROTO:ssl]://[HOST]:[PORT:80]" webui: "[PROTO:ssl]://[HOST]:[PORT:80]"
arch: arch:

View File

@@ -5,4 +5,4 @@
# ============================================================================== # ==============================================================================
bashio::log.info "Starting PHP-FPM..." bashio::log.info "Starting PHP-FPM..."
exec php-fpm8 --nodaemonize exec php-fpm81 --nodaemonize

View File

@@ -7,31 +7,33 @@ ARG OSCAM_VERSION
RUN \ RUN \
echo "**** install build packages ****" && \ echo "**** install build packages ****" && \
apk add --no-cache --virtual=build-dependencies \ apk add --no-cache --virtual=build-dependencies \
gcc \ build-base \
g++ \ libdvbcsa-dev \
libusb-dev \ libusb-dev \
linux-headers \ linux-headers \
make \
openssl-dev \ openssl-dev \
pcsc-lite-dev \ pcsc-lite-dev \
subversion \
tar \
shadow && \ shadow && \
echo "**** install runtime packages ****" && \ echo "**** install runtime packages ****" && \
apk add --no-cache \ apk add --no-cache \
ccid \ ccid \
curl \ libdvbcsa \
libcrypto1.1 \ openssl \
libssl1.1 \
libusb \ libusb \
pcsc-lite \ pcsc-lite \
pcsc-lite-libs && \ pcsc-lite-libs && \
echo "**** compile oscam ****" && \ echo "**** compile oscam ****" && \
if [ -z ${OSCAM_VERSION+x} ]; then \ if [ -z ${OSCAM_VERSION+x} ]; then \
OSCAM_VERSION=$(svn info --show-item revision https://svn.streamboard.tv/oscam/trunk ); \ OSCAM_VERSION=$(curl -s https://git.streamboard.tv/api/v4/projects/11/repository/tags | jq -r '.[0].name'); \
fi && \ fi && \
svn checkout https://svn.streamboard.tv/oscam/trunk@${OSCAM_VERSION} /tmp/oscam-svn && \ mkdir -p /tmp/oscam && \
cd /tmp/oscam-svn && \ curl -o \
/tmp/oscam.tar.gz -L \
"https://git.streamboard.tv/common/oscam/-/archive/${OSCAM_VERSION}/oscam-${OSCAM_VERSION}.tar.gz" && \
tar xf \
/tmp/oscam.tar.gz -C \
/tmp/oscam --strip-components=1 && \
cd /tmp/oscam && \
./config.sh \ ./config.sh \
--enable all \ --enable all \
--disable \ --disable \
@@ -58,7 +60,7 @@ RUN \
/tmp/omnikey && \ /tmp/omnikey && \
curl -o \ curl -o \
/tmp/omnikey.tar.gz -L \ /tmp/omnikey.tar.gz -L \
"https://www3.hidglobal.com/sites/default/files/drivers/ifdokccid_linux_x86_64-v4.2.8.tar.gz" && \ "https://raw.githubusercontent.com/d-two/hassio-addons/main/oscam/ifdokccid_linux_x86_64-v4.2.8.tar.gz" && \
tar xzf \ tar xzf \
/tmp/omnikey.tar.gz -C \ /tmp/omnikey.tar.gz -C \
/tmp/omnikey --strip-components=2 && \ /tmp/omnikey --strip-components=2 && \

View File

@@ -5,6 +5,7 @@
"description": "This add-on allows you to have a OSCAM-Server.", "description": "This add-on allows you to have a OSCAM-Server.",
"arch": ["armv7", "aarch64", "amd64"], "arch": ["armv7", "aarch64", "amd64"],
"startup": "application", "startup": "application",
"webui": "http://[HOST]:[PORT:8888]",
"boot": "auto", "boot": "auto",
"init": false, "init": false,
"uart": true, "uart": true,

Binary file not shown.

View File

@@ -46,7 +46,7 @@ FROM ${BUILD_FROM}
SHELL ["/bin/bash", "-o", "pipefail", "-c"] SHELL ["/bin/bash", "-o", "pipefail", "-c"]
# Copy binary from build container # Copy binary from build container
COPY --from=builder /tmp/ps3netsrv-bin/ps3netsrv /usr/local/bin/ps3netsrv COPY --from=builder /tmp/ps3netsrv-bin/ps3netsrv /bin/ps3netsrv
# Install runtime deps and add users # Install runtime deps and add users
RUN \ RUN \
@@ -59,19 +59,13 @@ RUN \
libstdc++ \ libstdc++ \
musl \ musl \
musl-utils \ musl-utils \
mbedtls && \ mbedtls
echo "Creating ps3netsrv user..." && \
useradd -u 1000 -U -M -s /bin/false ps3netsrv && \
usermod -G users ps3netsrv && \
mkdir -p /var/log/ps3netsrv && \
chown -R nobody:nogroup /var/log/ps3netsrv && \
echo "Cleaning up temp directory..." && \
rm -rf /tmp/*
# Add files # Add files
COPY rootfs/ / COPY rootfs/ /
# Corrects permissions for s6 v3 # Corrects permissions for s6 v3
RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi
RUN if [ -d /etc/s6-overlay ]; then chmod -R 755 /etc/s6-overlay; fi RUN if [ -d /etc/s6-overlay ]; then chmod -R 755 /etc/s6-overlay; fi
# Build arguments # Build arguments
@@ -90,11 +84,11 @@ LABEL \
io.hass.arch="${BUILD_ARCH}" \ io.hass.arch="${BUILD_ARCH}" \
io.hass.type="addon" \ io.hass.type="addon" \
io.hass.version=${BUILD_VERSION} \ io.hass.version=${BUILD_VERSION} \
maintainer="Franck Nijhof <frenck@addons.community>" \ maintainer="D-Two <the.dtwo@gmail.com>" \
org.opencontainers.image.title="${BUILD_NAME}" \ org.opencontainers.image.title="${BUILD_NAME}" \
org.opencontainers.image.description="${BUILD_DESCRIPTION}" \ org.opencontainers.image.description="${BUILD_DESCRIPTION}" \
org.opencontainers.image.vendor="Home Assistant Community Add-ons" \ org.opencontainers.image.vendor="Home Assistant Community Add-ons" \
org.opencontainers.image.authors="Franck Nijhof <frenck@addons.community>" \ org.opencontainers.image.authors="D-Two <the.dtwo@gmail.com>" \
org.opencontainers.image.licenses="MIT" \ org.opencontainers.image.licenses="MIT" \
org.opencontainers.image.url="https://addons.community" \ org.opencontainers.image.url="https://addons.community" \
org.opencontainers.image.source="https://github.com/${BUILD_REPOSITORY}" \ org.opencontainers.image.source="https://github.com/${BUILD_REPOSITORY}" \

View File

@@ -20,7 +20,10 @@ The architectures supported by this image are:
## Quick Start ## Quick Start
- `media/ps3netsrv`: This location contains files from your host that need to be accessible by the application. cifsdomain: workgroup (optional)
cifspassword: password
cifsusername: username
networkdisks: //192.168.137.100/path/to/games
### Ports ### Ports

66
ps3netsrv/apparmor.txt Normal file
View File

@@ -0,0 +1,66 @@
#include <tunables/global>
profile ps3netserver_addon flags=(attach_disconnected,mediate_deleted) {
#include <abstractions/base>
capability,
file,
signal,
mount,
umount,
remount,
network udp,
network tcp,
network dgram,
network stream,
network inet,
network inet6,
network netlink raw,
network unix dgram,
capability setgid,
capability setuid,
capability sys_admin,
capability dac_read_search,
# capability dac_override,
# capability sys_rawio,
# S6-Overlay
/init ix,
/run/{s6,s6-rc*,service}/** ix,
/package/** ix,
/command/** ix,
/run/{,**} rwk,
/dev/tty rw,
/bin/** ix,
/usr/bin/** ix,
/usr/lib/bashio/** ix,
/etc/s6/** rix,
/run/s6/** rix,
/etc/services.d/** rwix,
/etc/cont-init.d/** rwix,
/etc/cont-finish.d/** rwix,
/init rix,
/var/run/** mrwkl,
/var/run/ mrwkl,
/dev/i2c-1 mrwkl,
# Files required
/dev/fuse mrwkl,
/dev/sda1 mrwkl,
/dev/sdb1 mrwkl,
/dev/nvme0 mrwkl,
/dev/nvme1 mrwkl,
/dev/mmcblk0p1 mrwkl,
/dev/* mrwkl,
/tmp/** mrkwl,
# Data access
/data/** rw,
# suppress ptrace denials when using 'docker ps' or using 'ps' inside a container
ptrace (trace,read) peer=docker-default,
# docker daemon confinement requires explict allow rule for signal
signal (receive) set=(kill,term) peer=/usr/bin/docker,
}

View File

@@ -1,7 +1,7 @@
--- ---
name: Ps3NetServer name: Ps3NetServer
slug: ps3netserver slug: ps3netserver
version: 0.1.0 version: 0.1.3-NAS
description: This is a Docker container for ps3netsrv (or ps3netsvr). description: This is a Docker container for ps3netsrv (or ps3netsvr).
url: https://github.com/d-two/hassio-addons/tree/main/ps3netsrv url: https://github.com/d-two/hassio-addons/tree/main/ps3netsrv
startup: application startup: application
@@ -13,9 +13,15 @@ arch:
- armv7 - armv7
- i386 - i386
boot: auto boot: auto
map:
- media:rw
ports: ports:
38008/tcp: 38008 38008/tcp: 38008
ports_description: ports_description:
38008/tcp: Network port 38008/tcp: Network port
privileged:
- SYS_ADMIN
- DAC_READ_SEARCH
schema:
cifsdomain: str?
cifspassword: str
cifsusername: str
networkdisks: str

View File

@@ -0,0 +1,151 @@
#!/command/with-contenv bashio
# shellcheck shell=bash
# shellcheck disable=
#########################
# MOUNT SMB SHARES v1.6 #
#########################
if bashio::config.has_value 'networkdisks'; then
# Define variables
MOREDISKS=$(bashio::config 'networkdisks')
CIFS_USERNAME=$(bashio::config 'cifsusername')
CIFS_PASSWORD=$(bashio::config 'cifspassword')
SMBVERS=""
SECVERS=""
# Mount CIFS Share if configured and if Protection Mode is active
echo 'Mounting smb share(s)...'
if bashio::config.has_value 'cifsdomain'; then
echo "Using domain $(bashio::config 'cifsdomain')"
DOMAIN=",domain=$(bashio::config 'cifsdomain')"
else
DOMAIN=""
fi
# Mount using UID/GID values
if bashio::config.has_value 'PUID' && bashio::config.has_value 'PGID' && [ -z ${ROOTMOUNT+x} ]; then
echo "Using PUID $(bashio::config 'PUID') and PGID $(bashio::config 'PGID')"
PUID=",uid=$(bashio::config 'PUID')"
PGID=",gid=$(bashio::config 'PGID')"
else
PUID=",uid=$(id -u)"
PGID=",gid=$(id -g)"
fi
# Clean data
MOREDISKS=${MOREDISKS// \/\//,\/\/}
MOREDISKS=${MOREDISKS//, /,}
MOREDISKS=${MOREDISKS// /"\040"}
# Mounting disks
# shellcheck disable=SC2086
for disk in ${MOREDISKS//,/ }; do # Separate comma separated values
# Clean name of network share
# shellcheck disable=SC2116,SC2001
disk=$(echo $disk | sed "s,/$,,") # Remove / at end of name
disk="${disk//"\040"/ }" #replace \040 with
diskname="${disk//\\//}" #replace \ with /
diskname="${diskname##*/}" # Get only last part of the name
MOUNTED=false
# Data validation
if [[ ! $disk =~ ^.*+[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+[/]+.*+$ ]]; then
bashio::log.fatal "The structure of your \"networkdisks\" option : \"$disk\" doesn't seem correct, please use a structure like //123.12.12.12/sharedfolder,//123.12.12.12/sharedfolder2. If you don't use it, you can simply remove the text, this will avoid this error message in the future."
break 2
fi
# Does server exists
server="$(echo "$disk" | grep -E -o "[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+")"
if ping -w 1 -c 1 8.8.8.8 >/dev/null; then
ping -w 5 -c 1 "$server" >/dev/null || \
{ bashio::log.fatal "Your server $server from $disk doesn't ping, is it correct?"; break 2; }
fi
# Prepare mount point
mkdir -p /mnt/"$diskname"
chown -R root:root /mnt/"$diskname"
# if Fail test different smb and sec versions
if [ "$MOUNTED" = false ]; then
# Test with domain, remove otherwise
####################################
for DOMAINVAR in "$DOMAIN" ",domain=WORKGROUP" ""; do
# Test with PUIDPGID, remove otherwise
######################################
for PUIDPGID in "$PUID$PGID" "$PUID$PGID,forceuid,forcegid" ""; do
# Test with iocharset utf8, remove otherwise
############################################
for CHARSET in ",iocharset=utf8" ""; do
# Test with different SMB versions
##################################
for SMBVERS in "" ",vers=3" ",vers=1.0" ",vers=2.1" ",vers=3.0" ",nodfs"; do
# Test with different security versions
#######################################
for SECVERS in "" ",sec=ntlm" ",sec=ntlmv2" ",sec=ntlmv2i" ",sec=ntlmssp" ",sec=ntlmsspi" ",sec=krb5i" ",sec=krb5"; do
if [ "$MOUNTED" = false ]; then
mount -t cifs -o "rw,file_mode=0775,dir_mode=0775,username=$CIFS_USERNAME,password=${CIFS_PASSWORD},nobrl$SMBVERS$SECVERS$PUIDPGID$CHARSET$DOMAINVAR" "$disk" /mnt/"$diskname" 2>ERRORCODE \
&& MOUNTED=true && MOUNTOPTIONS="$SMBVERS$SECVERS$PUIDPGID$CHARSET$DOMAINVAR" || MOUNTED=false
fi
done
done
done
done
done
fi
# Messages
if [ "$MOUNTED" = true ] && mountpoint -q /mnt/"$diskname"; then
#Test write permissions
# shellcheck disable=SC2015
touch "/mnt/$diskname/testaze" && rm "/mnt/$diskname/testaze" &&
bashio::log.info "... $disk successfully mounted to /mnt/$diskname with options $MOUNTOPTIONS" ||
bashio::log.fatal "Disk is mounted, however unable to write in the shared disk. Please check UID/GID for permissions, and if the share is rw"
# Test for serverino
# shellcheck disable=SC2015
touch "/mnt/$diskname/testaze" && mv "/mnt/$diskname/testaze" "/mnt/$diskname/testaze2" && rm "/mnt/$diskname/testaze2" ||
(umount "/mnt/$diskname" && mount -t cifs -o "iocharset=utf8,rw,file_mode=0775,dir_mode=0775,username=$CIFS_USERNAME,password=${CIFS_PASSWORD}$MOUNTOPTIONS,noserverino" "$disk" /mnt/"$diskname" && bashio::log.warning "noserverino option used")
else
# Mounting failed messages
bashio::log.fatal "Error, unable to mount $disk to /mnt/$diskname with username $CIFS_USERNAME, $CIFS_PASSWORD. Please check your remote share path, username, password, domain, try putting 0 in UID and GID"
bashio::log.fatal "Here is some debugging info :"
# Download smbclient
if command -v "apk" &>/dev/null; then apk add --no-cache samba-client &>/dev/null; fi
if command -v "apt" &>/dev/null; then apt-get install smbclient &>/dev/null; fi
if command -v "pacman" &>/dev/null; then pacman -S smbclient; fi
# Provide debugging info
smbclient -L $disk -U "$CIFS_USERNAME%$CIFS_PASSWORD" || true
# Error code
mount -t cifs -o "rw,file_mode=0775,dir_mode=0775,username=$CIFS_USERNAME,password=${CIFS_PASSWORD},nobrl$DOMAINVAR" "$disk" /mnt/"$diskname" 2>ERRORCODE || MOUNTED=false
bashio::log.fatal "Error read : $(<ERRORCODE)"
rm ERRORCODE*
# clean folder
umount "/mnt/$diskname" 2>/dev/null || true
rmdir "/mnt/$diskname" || true
fi
done
if [ -f ERRORCODE ]; then
rm ERRORCODE*
fi
fi

View File

@@ -1,20 +1,20 @@
#!/command/with-contenv bashio #!/command/with-contenv bashio
# shellcheck shell=bash # shellcheck shell=bash
USER_ID=${USER_ID:-1000} USER_ID=${USER_ID:-0}
GROUP_ID=${GROUP_ID:-1000} GROUP_ID=${GROUP_ID:-0}
groupmod -o -g "$GROUP_ID" ps3netsrv #groupmod -o -g "$GROUP_ID" ps3netsrv
usermod -o -u "$USER_ID" ps3netsrv #usermod -o -u "$USER_ID" ps3netsrv
echo ' echo '
------------------------------------- -------------------------------------
GID/UID GID/UID
-------------------------------------' -------------------------------------'
echo " echo "
User uid: $(id -u ps3netsrv) User uid: $(id -u ${USER_ID})
User gid: $(id -g ps3netsrv) User gid: $(id -g ${GROUP_ID})
------------------------------------- -------------------------------------
" "
mkdir -p /media/ps3netsrv #mkdir -p /media/ps3netsrv

View File

@@ -5,5 +5,29 @@
# Runs the ps3netsrv # Runs the ps3netsrv
# ============================================================================== # ==============================================================================
bashio::log.info "Starting Ps3NetSrv...." if bashio::config.has_value 'networkdisks'; then
/usr/local/bin/ps3netsrv /media/ps3netsrv
# Define variables
MOREDISKS=$(bashio::config 'networkdisks')
# Clean data
MOREDISKS=${MOREDISKS// \/\//,\/\/}
MOREDISKS=${MOREDISKS//, /,}
MOREDISKS=${MOREDISKS// /"\040"}
# Mounting disks
# shellcheck disable=SC2086
for disk in ${MOREDISKS//,/ }; do # Separate comma separated values
# Clean name of network share
# shellcheck disable=SC2116,SC2001
disk=$(echo $disk | sed "s,/$,,") # Remove / at end of name
disk="${disk//"\040"/ }" #replace \040 with
diskname="${disk//\\//}" #replace \ with /
diskname="${diskname##*/}" # Get only last part of the name
bashio::log.info "Starting Ps3NetSrv.... ($diskname)"
exec ps3netsrv /mnt/"$diskname"
break
done
fi

View File

@@ -13,11 +13,13 @@ ENV HOME="/config"
# copy patches # copy patches
COPY patches/ /tmp/patches/ COPY patches/ /tmp/patches/
RUN apk add --no-cache musl=1.2.2-r9
RUN \ RUN \
echo "**** install build packages ****" && \ echo "**** install build packages ****" && \
apk add --no-cache \ apk add --no-cache \
libcrypto1.1=1.1.1t-r1 \ libcrypto1.1 \
libssl1.1=1.1.1t-r1 \ libssl1.1 \
autoconf \ autoconf \
automake \ automake \
bsd-compat-headers \ bsd-compat-headers \

View File

@@ -1,26 +0,0 @@
#!/usr/bin/with-contenv bash
FILES=$(find /dev/dri /dev/dvb -type c -print 2>/dev/null)
for i in $FILES
do
VIDEO_GID=$(stat -c '%g' "$i")
if id -G abc | grep -qw "$VIDEO_GID"; then
touch /groupadd
else
if [ ! "${VIDEO_GID}" == '0' ]; then
VIDEO_NAME=$(getent group "${VIDEO_GID}" | awk -F: '{print $1}')
if [ -z "${VIDEO_NAME}" ]; then
VIDEO_NAME="video$(head /dev/urandom | tr -dc 'a-z0-9' | head -c8)"
groupadd "$VIDEO_NAME"
groupmod -g "$VIDEO_GID" "$VIDEO_NAME"
fi
usermod -a -G "$VIDEO_NAME" abc
touch /groupadd
fi
fi
done
if [ -n "${FILES}" ] && [ ! -f "/groupadd" ]; then
usermod -a -G root abc
fi