File tree Expand file tree Collapse file tree 2 files changed +27
-5
lines changed
etc/s6-overlay/s6-rc.d/init-mod-jellyfin-rffmpeg-add-package
usr/local/bin/wol_rffmpeg Expand file tree Collapse file tree 2 files changed +27
-5
lines changed Original file line number Diff line number Diff line change 11#!/usr/bin/with-contenv bash
22
3- for package in iputils-ping openssh-client python3-click python3-yaml wakeonlan; do
4- if ! dpkg -s "${package}" >/dev/null 2>&1; then
5- PACKAGES="${package} ${PACKAGES}"
3+ ## Ubuntu
4+ if [ -f /usr/bin/apt ]; then
5+ for package in iputils-ping openssh-client python3-click python3-yaml python3 wakeonlan; do
6+ if ! dpkg -s "${package}" >/dev/null 2>&1; then
7+ PACKAGES="${package} ${PACKAGES}"
8+ fi
9+ done
10+ fi
11+ # Alpine
12+ if [ -f /sbin/apk ]; then
13+ if ! grep -qxF '@testing https://dl-cdn.alpinelinux.org/alpine/edge/testing' /etc/apk/repositories; then
14+ echo @testing https://dl-cdn.alpinelinux.org/alpine/edge/testing >> /etc/apk/repositories
615 fi
7- done
16+ for package in openssh py3-click py3-yaml python3 wol@testing; do
17+ if ! apk info -e "${package}" >/dev/null 2>&1; then
18+ PACKAGES="${package} ${PACKAGES}"
19+ fi
20+ done
21+ fi
822
923if [ -n "${PACKAGES}" ]; then
1024 echo "${PACKAGES}" >> /mod-repo-packages-to-install.list
Original file line number Diff line number Diff line change 2222 if [ ! -z $WOL_NATIVE_PORT ]; then
2323 WOL_OPTIONS=" $WOL_OPTIONS -p $WOL_NATIVE_PORT "
2424 fi
25- wakeonlan $WOL_OPTIONS $mac
25+ # Alpine
26+ if [ -f /sbin/apk ]; then
27+ wol $WOL_OPTIONS $mac
28+ fi
29+ # Ubuntu
30+ if [ -f /usr/bin/apt ]; then
31+ wakeonlan $WOL_OPTIONS $mac
32+ fi
33+ # wakeonlan -i $RFFMPEG_HOST $mac
2634 echo " waiting $WOL_WAIT seconds for $RFFMPEG_HOST to wake"
2735 sleep $WOL_WAIT
2836fi
You can’t perform that action at this time.
0 commit comments