Skip to content

Commit

Permalink
Merge pull request #14 from frizkyiman/dev
Browse files Browse the repository at this point in the history
fix and updates

- update openwrt to 23.05.3 latest branch,
- update immortalwrt to 23.05.2 latest branch,
- add Neko and Passwall2 with new tunnel option,
- update core script back to download latest mihomo meta core,
- add Base62 packages,
- add netmonitor,
- fix with update code and logic,
- a few adjustment and tweaks.
  • Loading branch information
frizkyiman authored Mar 29, 2024
2 parents 10912f7 + e25457d commit c45a808
Show file tree
Hide file tree
Showing 13 changed files with 211 additions and 70 deletions.
41 changes: 23 additions & 18 deletions .github/workflows/generate-friwrt-amlogic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,15 @@ on:
release_branch:
description: "Select the release branch:"
required: true
default: "openwrt:23.05.2"
default: "openwrt:23.05.3"
type: choice
options:
- openwrt:21.02.7
- openwrt:23.05.2
- openwrt:23.05.3
- immortalwrt:21.02.7
- immortalwrt:23.05.1
- immortalwrt:23.05.2
target:
description: "Select device board"
required: false
Expand Down Expand Up @@ -70,15 +72,18 @@ on:
- dev
- beta
tunnel:
description: "Select VPN Client app (!passwall only support for newer branch with fw4 firewall!):"
description: "Select VPN Client app (!neko and passwall only support for newer branch with fw4 firewall!):"
required: true
default: "openclash"
type: choice
options:
- all
- openclash
- neko
- passwall
- openclash-passwall
- neko-passwall
- openclash-passwall-neko
- no-tunnel
clean:
description: "Do 'make clean' for each run"
Expand All @@ -90,6 +95,11 @@ on:
required: false
default: "false"
type: boolean
revision-tag:
description: "Revision img tag"
required: false
default: "false"
type: boolean

env:
TYPE: AMLOGIC
Expand All @@ -99,6 +109,7 @@ env:
CLEAN: ${{ inputs.clean }}
TZ: Asia/Jakarta
PRE_RELEASE: ${{ inputs.upload-prerelease }}
REVISION_TAG: ${{ inputs.revision-tag }}

jobs:
Generate:
Expand Down Expand Up @@ -171,15 +182,7 @@ jobs:
elif [ "$TARGET" == "nanopi-r5s" ]; then
echo "openwrt_board=rk3568" >> $GITHUB_ENV
fi
if [ "$RELEASE_BRANCH" == "openwrt:23.05.2" ]; then
echo "PROFILE=generic" >> $GITHUB_ENV
echo "TARGET_SYSTEM=armsr/armv8" >> $GITHUB_ENV
echo "TARGET_NAME=armsr-armv8" >> $GITHUB_ENV
TARGET_NAME="armsr-armv8"
echo "ARCH_1=arm64" >> $GITHUB_ENV
echo "ARCH_2=aarch64" >> $GITHUB_ENV
echo "ARCH_3=aarch64_generic" >> $GITHUB_ENV
elif [ "$RELEASE_BRANCH" == "immortalwrt:23.05.1" ]; then
if [ "$(echo "${RELEASE_BRANCH#*:}" | cut -d'.' -f1)" == "23" ]; then
echo "PROFILE=generic" >> $GITHUB_ENV
echo "TARGET_SYSTEM=armsr/armv8" >> $GITHUB_ENV
echo "TARGET_NAME=armsr-armv8" >> $GITHUB_ENV
Expand Down Expand Up @@ -243,8 +246,8 @@ jobs:
bash scripts/misc.sh
if [[ "$TUNNEL" == "all" && "$BRANCH" != "21.02.7" ]]; then
echo "VPN Client: $TUNNEL"
bash scripts/tunnel_app.sh openclash-passwall
elif [[ ("$TUNNEL" == "passwall" || "$TUNNEL" == "openclash-passwall") && "$BRANCH" != "21.02.7" || "$TUNNEL" == "openclash" ]]; then
bash scripts/tunnel_app.sh openclash-passwall-neko
elif [[ ("$TUNNEL" == "passwall" || "$TUNNEL" == "openclash-passwall" || "$TUNNEL" == "neko-passwall" || "$TUNNEL" == "openclash-passwall-neko") && "$BRANCH" != "21.02.7" || "$TUNNEL" == "openclash" || "$TUNNEL" == "neko" ]]; then
echo "VPN Client: $TUNNEL"
bash scripts/tunnel_app.sh "$TUNNEL"
elif [[ "$TUNNEL" == "all" && "$BRANCH" = "21.02.7" ]]; then
Expand All @@ -253,7 +256,9 @@ jobs:
else
echo "No VPN Client selected"
fi
if [ "$TUNNEL" = "openclash" ] || [ "$TUNNEL" = "openclash-passwall" ] || [ "$TUNNEL" = "all" ]; then bash scripts/clash-core.sh; fi
if [ "$TUNNEL" = "openclash" ] || [ "$TUNNEL" = "openclash-passwall" ]; then bash scripts/clash-core.sh; fi
if [ "$TUNNEL" = "neko" ] || [ "$TUNNEL" = "neko-passwall" ]; then bash scripts/neko_core.sh; fi
if [ "$TUNNEL" = "openclash-passwall-neko" ] || [ "$TUNNEL" = "all" ]; then bash scripts/clash-core.sh; bash scripts/neko_core.sh; fi
ls packages
echo "status=success" >> $GITHUB_OUTPUT
echo -e "Server space usage before starting to compile: \n$(df -hT ${PWD}) \n"
Expand All @@ -265,7 +270,7 @@ jobs:
cd $WORKING_DIR
mkdir -p compiled_images
if [[ "$TUNNEL" == "all" && "$BRANCH" != "21.02.7" ]]; then
for t in openclash-passwall openclash passwall no-tunnel; do
for t in openclash-passwall neko-passwall openclash-passwall-neko openclash passwall neko no-tunnel; do
echo "Compiling with VPN Client: $t"
if [ "$CLEAN" == "true" ]; echo "Start 'make clean' before building images."; then make clean; fi
time bash make-build.sh $PROFILE $t
Expand All @@ -278,7 +283,7 @@ jobs:
time bash make-build.sh $PROFILE $t
for file in bin/targets/"$TARGET_SYSTEM"/*rootfs.tar.gz; do mv "$file" compiled_images; done
done
elif [[ ("$TUNNEL" == "passwall" || "$TUNNEL" == "openclash-passwall") && "$BRANCH" != "21.02.7" || "$TUNNEL" == "openclash" || "$TUNNEL" == "no-tunnel" ]]; then
elif [[ ("$TUNNEL" == "neko" || "$TUNNEL" == "passwall" || "$TUNNEL" == "openclash-passwall-neko") && "$BRANCH" != "21.02.7" || "$TUNNEL" == "openclash" || "$TUNNEL" == "no-tunnel" ]]; then
echo "Compiling with VPN Client: $TUNNEL"
bash make-build.sh $PROFILE $TUNNEL
for file in bin/targets/"$TARGET_SYSTEM"/*rootfs.tar.gz; do mv "$file" compiled_images; done
Expand Down Expand Up @@ -313,8 +318,8 @@ jobs:
cd $WORKING_DIR
for file in compiled_images/*rootfs.tar.gz; do mv "$file" ${{ env.PACKAGED_OUTPUTPATH }}; done
cd ${{ env.PACKAGED_OUTPUTPATH }}
for file in *.img.gz; do mv "$file" fri_$(basename "$file" .img.gz)$( echo "_$TUNNEL" ).img.gz; done
for file in *rootfs.tar.gz; do mv "$file" fri_$(basename "$file" .tar.gz)$( echo "_$TUNNEL" ).tar.gz; done
for file in *.img.gz; do mv "$file" fri_$(basename "$file" .img.gz)$( echo "_$TUNNEL" )${REVISION_TAG:+_rev}.img.gz; done
for file in *rootfs.tar.gz; do mv "$file" fri_$(basename "$file" .tar.gz)$( echo "_$TUNNEL" )${REVISION_TAG:+_rev}.tar.gz; done
if wget -q https://github.com/frizkyiman/friWrt-MyWrtBuilder/releases/download/amlogic-${{ env.openwrt_board }}-${{ env.BASE }}-${{ env.BRANCH }}-${{ env.DATEMONTH }}/sha256sums; then
rm -r *.sha && sha256sum *.gz >> sha256sums
else
Expand Down
39 changes: 28 additions & 11 deletions .github/workflows/generate-friwrt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,25 +23,30 @@ on:
release_branch:
description: "Select the release branch:"
required: true
default: "openwrt:23.05.2"
default: "openwrt:23.05.3"
type: choice
options:
- openwrt:snapshots
- openwrt:21.02.7
- openwrt:23.05.2
- openwrt:23.05.3
- immortalwrt:snapshots
- immortalwrt:21.02.7
- immortalwrt:23.05.1
- immortalwrt:23.05.2
tunnel:
description: "Select VPN Client app (!passwall only support for newer branch with fw4 firewall!):"
description: "Select VPN Client app (!neko and passwall only support for newer branch with fw4 firewall!):"
required: true
default: "all"
type: choice
options:
- all
- openclash
- neko
- passwall
- openclash-passwall
- neko-passwall
- openclash-passwall-neko
- no-tunnel
clean:
description: "Do 'make clean' for each run"
Expand All @@ -63,6 +68,11 @@ on:
required: false
default: "false"
type: boolean
revision-tag:
description: "Revision img tag"
required: false
default: "false"
type: boolean

env:
RELEASE_BRANCH: ${{ inputs.release_branch }}
Expand All @@ -71,6 +81,7 @@ env:
CLEAN: ${{ inputs.clean }}
TZ: Asia/Jakarta
PRE_RELEASE: ${{ inputs.upload-prerelease }}
REVISION_TAG: ${{ inputs.revision-tag }}

jobs:
prebuild:
Expand Down Expand Up @@ -188,8 +199,8 @@ jobs:
bash scripts/misc.sh
if [[ "$TUNNEL" == "all" && "$BRANCH" != "21.02.7" ]]; then
echo "VPN Client: $TUNNEL"
bash scripts/tunnel_app.sh openclash-passwall
elif [[ ("$TUNNEL" == "passwall" || "$TUNNEL" == "openclash-passwall") && "$BRANCH" != "21.02.7" || "$TUNNEL" == "openclash" ]]; then
bash scripts/tunnel_app.sh openclash-passwall-neko
elif [[ ("$TUNNEL" == "passwall" || "$TUNNEL" == "openclash-passwall" || "$TUNNEL" == "neko-passwall" || "$TUNNEL" == "openclash-passwall-neko") && "$BRANCH" != "21.02.7" || "$TUNNEL" == "openclash" || "$TUNNEL" == "neko" ]]; then
echo "VPN Client: $TUNNEL"
bash scripts/tunnel_app.sh "$TUNNEL"
elif [[ "$TUNNEL" == "all" && "$BRANCH" = "21.02.7" ]]; then
Expand All @@ -198,7 +209,9 @@ jobs:
else
echo "No VPN Client selected"
fi
if [ "$TUNNEL" = "openclash" ] || [ "$TUNNEL" = "openclash-passwall" ] || [ "$TUNNEL" = "all" ]; then bash scripts/clash-core.sh; fi
if [ "$TUNNEL" = "openclash" ] || [ "$TUNNEL" = "openclash-passwall" ]; then bash scripts/clash-core.sh; fi
if [ "$TUNNEL" = "neko" ] || [ "$TUNNEL" = "neko-passwall" ]; then bash scripts/neko_core.sh; fi
if [ "$TUNNEL" = "openclash-passwall-neko" ] || [ "$TUNNEL" = "all" ]; then bash scripts/clash-core.sh; bash scripts/neko_core.sh; fi
ls packages
echo "status=success" >> $GITHUB_OUTPUT
echo -e "Server space usage before starting to compile: \n$(df -hT ${PWD}) \n"
Expand All @@ -210,28 +223,32 @@ jobs:
cd $WORKING_DIR
mkdir -p compiled_images
if [[ "$TUNNEL" == "all" && "$BRANCH" != "21.02.7" ]]; then
for t in openclash-passwall openclash passwall no-tunnel; do
for t in openclash-passwall neko-passwall openclash-passwall-neko openclash passwall neko no-tunnel; do
echo "Compiling with VPN Client: $t"
if [ "$CLEAN" == "true" ]; echo "Start 'make clean' before building images."; then make clean; fi
time bash make-build.sh $PROFILE $t
rm -rf bin/targets/"$TARGET_SYSTEM"/*.{json,manifest,bin,*-rootfs*,*factory*,sha256sums}
for file in bin/targets/"$TARGET_SYSTEM"/*-"$TARGET_NAME"-*.img.gz; do mv "$file" compiled_images/fri_$(basename "$file" .img.gz)$( echo "_$t" )_$DATE.img.gz; done
for file in bin/targets/"$TARGET_SYSTEM"/*-"$TARGET_NAME"-*.img.gz; do mv "$file" compiled_images/fri_$(basename "$file" .img.gz)$( echo "_$t" )_$DATE${REVISION_TAG:+_rev}.img.gz; done
done
elif [[ "$TUNNEL" == "all" && "$BRANCH" = "21.02.7" ]]; then
for t in openclash no-tunnel; do
echo "Compiling with VPN Client: $t"
if [ "$CLEAN" == "true" ]; echo "Start 'make clean' before building images."; then make clean; fi
time bash make-build.sh $PROFILE $t
rm -rf bin/targets/"$TARGET_SYSTEM"/*.{json,manifest,bin,*-rootfs*,*factory*,sha256sums}
for file in bin/targets/"$TARGET_SYSTEM"/*-"$TARGET_NAME"-*.img.gz; do mv "$file" compiled_images/fri_$(basename "$file" .img.gz)$( echo "_$t" )_$DATE.img.gz; done
for file in bin/targets/"$TARGET_SYSTEM"/*-"$TARGET_NAME"-*.img.gz; do mv "$file" compiled_images/fri_$(basename "$file" .img.gz)$( echo "_$t" )_$DATE${REVISION_TAG:+_rev}.img.gz; done
done
elif [[ ("$TUNNEL" == "passwall" || "$TUNNEL" == "openclash-passwall") && "$BRANCH" != "21.02.7" || "$TUNNEL" == "openclash" || "$TUNNEL" == "no-tunnel" ]]; then
elif [[ ("$TUNNEL" == "neko" || "$TUNNEL" == "passwall" || "$TUNNEL" == "openclash-passwall" || "$TUNNEL" == "neko-passwall" || "$TUNNEL" == "openclash-passwall-neko") && "$BRANCH" != "21.02.7" || "$TUNNEL" == "openclash" || "$TUNNEL" == "no-tunnel" ]]; then
echo "Compiling with VPN Client: $TUNNEL"
bash make-build.sh $PROFILE $TUNNEL
rm -rf bin/targets/"$TARGET_SYSTEM"/*.{json,manifest,bin,*-rootfs*,*factory*,sha256sums}
for file in bin/targets/"$TARGET_SYSTEM"/*-"$TARGET_NAME"-*.img.gz; do mv "$file" compiled_images/fri_$(basename "$file" .img.gz)$( echo "_$TUNNEL" )_$DATE.img.gz; done
for file in bin/targets/"$TARGET_SYSTEM"/*-"$TARGET_NAME"-*.img.gz; do mv "$file" compiled_images/fri_$(basename "$file" .img.gz)$( echo "_$TUNNEL" )_$DATE${REVISION_TAG:+_rev}.img.gz; done
fi
if wget -q https://github.com/frizkyiman/friWrt-MyWrtBuilder/releases/download/${{ env.PROFILE }}-${{ env.BASE }}-${{ env.BRANCH }}-${{ env.DATEMONTH }}/sha256sums; then
sha256sum compiled_images/fri_*.img.gz >> compiled_images/sha256sums
else
sha256sum compiled_images/fri_*.img.gz > compiled_images/sha256sums
fi
sha256sum compiled_images/fri_*.img.gz > compiled_images/sha256sums
ls -l compiled_images
echo "status=success" >> $GITHUB_OUTPUT
echo -e "Server space usage after compilation: \n$(df -hT ${PWD}) \n"
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,16 @@ on:
- immortalwrt:21.02.7
- immortalwrt:23.05.1
tunnel:
description: "Select VPN Client app (!passwall only support for newer branch with fw4 firewall!):"
description: "Select VPN Client app (!neko and passwall only support for newer branch with fw4 firewall!):"
required: true
default: "all"
type: choice
options:
- all
- openclash
- neko
- passwall
- openclash-passwall
- openclash-passwall-neko
- no-tunnel
clean:
description: "Do 'make clean' for each run"
Expand Down
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,6 @@ Login info
- Internet Detector and Lite Watchdog,
- vnstat2 and Nlbwmon for Bandwith Monitoring,
- Argon, RTA and Alpha Theme with some cool custom login image,
- Modemmanager protocol for connecting 4g/5g modems (im using Dell DW5821e Snapdragon X20 LTE)
- Modemmanager with auto-reconnect,
- 3ginfo lite and Modeminfo, sms-tool, and other modem support app,
- OLED Display support (only Raspberrry Pi 4B tested),
- etc~
Expand Down
2 changes: 2 additions & 0 deletions external-package-urls.txt
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ all-all https://github.com/rtaserver/RTA-Theme-OpenWrt/releases/download/v1.0.4/
all-all https://github.com/rtaserver/RTA-Theme-OpenWrt/releases/download/v1.0.4/luci-app-rtaconfig_1.0.2_all.ipk
all-all https://github.com/derisamedia/luci-theme-alpha/releases/download/3.9.4/luci-theme-alpha_3.9.4-beta-9_all.ipk
all-all https://github.com/derisamedia/luci-theme-alpha/releases/download/3.9.4/luci-app-alpha-config_1.4_all.ipk
all-all https://github.com/rtaserver/rta-packages/releases/download/latest/luci-app-base64_1.0_all.ipk
all-all https://github.com/rtaserver/rta-packages/releases/download/latest/luci-app-netmonitor_1.0_all.ipk
#
################################################################################
# Branch version snapshots and 23.05 custom external package urls list #
Expand Down
6 changes: 3 additions & 3 deletions files/etc/crontabs/root
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Use crontab.guru to set crontab schedule
# Use crontab.guru to set crontab schedule spesific time

# Uncomment below if you want to use modem script
# Uncomment below if you want to use modem restart command on your need use case
# auto renew ip lease for modem rakitan every monday to saturday at 03:30 AM
#30 3 * * 1,2,3,4,5,6 echo AT+CFUN=4 | atinout - /dev/ttyUSB0 - && sleep 3 && ifdown wan && sleep 3 && echo AT+CFUN=1 | atinout - /dev/ttyUSB0 - && sleep 3 && ifup wan

Expand All @@ -10,7 +10,7 @@
# auto restart for modem rakitan every day at 03:30 AM
#30 3 * * * echo AT^RESET | atinout - /dev/ttyUSB0 - && sleep 20 && ifdown wan && ifup wan

# Sync time using bug host or ip
# Sync time, change google.com to your bug host or ip
0 12 * * * /sbin/sync_time.sh google.com

0 * * * * /sbin/free.sh >/dev/null 2>&1
Expand Down
44 changes: 33 additions & 11 deletions files/etc/uci-defaults/99-init-settings.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@
exec > /root/setup.log 2>&1

# dont remove!
echo "Start first boot custom setup!"
echo "$(date '+%A, %d %B %Y %T')"
echo "Device Model: $(grep '\"name\":' /etc/board.json | sed 's/ \+/ /g' | awk -F'\"' '{print $4}')"
echo "Processor: $(grep "model name" /proc/cpuinfo | awk -F ": " '{print $2}' | head -n 1 && grep "Hardware" /proc/cpuinfo | awk -F ": " '{print $2}')"
echo "Installed Time: $(date '+%A, %d %B %Y %T')"
echo "###############################################"
echo "Processor: $(ubus call system board | grep '\"system\"' | sed 's/ \+/ /g' | awk -F'\"' '{print $4}')"
echo "Device Model: $(ubus call system board | grep '\"model\"' | sed 's/ \+/ /g' | awk -F'\"' '{print $4}')"
echo "Device Board: $(ubus call system board | grep '\"board_name\"' | sed 's/ \+/ /g' | awk -F'\"' '{print $4}')"
sed -i "s#_('Firmware Version'),(L.isObject(boardinfo.release)?boardinfo.release.description+' / ':'')+(luciversion||''),#_('Firmware Version'),(L.isObject(boardinfo.release)?boardinfo.release.description+' build by friWrt [Ouc3kNF6]':''),#g" /www/luci-static/resources/view/status/include/10_system.js
if grep -q "ImmortalWrt" /etc/openwrt_release; then
sed -i "s/\(DISTRIB_DESCRIPTION='ImmortalWrt [0-9]*\.[0-9]*\.[0-9]*\).*'/\1'/g" /etc/openwrt_release
Expand All @@ -15,6 +16,8 @@ elif grep -q "OpenWrt" /etc/openwrt_release; then
sed -i "s/\(DISTRIB_DESCRIPTION='OpenWrt [0-9]*\.[0-9]*\.[0-9]*\).*'/\1'/g" /etc/openwrt_release
echo Branch version: "$(grep 'DISTRIB_DESCRIPTION=' /etc/openwrt_release | awk -F"'" '{print $2}')"
fi
echo "Tunnel Installed: $(opkg list-installed | grep -e luci-app-openclash -e luci-app-neko -e luci-app-passwall | awk '{print $1}' | tr '\n' ' ')"
echo "###############################################"

# Set login root password
(echo "friwrt"; sleep 1; echo "friwrt") | passwd > /dev/null
Expand Down Expand Up @@ -55,23 +58,36 @@ uci -q delete dhcp.lan.ndp
uci commit dhcp

# configure WLAN
echo "Setup Wireless if available"
uci set wireless.@wifi-device[0].disabled='0'
uci set wireless.@wifi-iface[0].disabled='0'
uci set wireless.@wifi-iface[0].encryption='psk2'
uci set wireless.@wifi-iface[0].key='friwrt2023'
uci set wireless.@wifi-device[0].country='ID'
if grep -q "Raspberry Pi 4" /proc/cpuinfo; then
if grep -q "Raspberry Pi 4\|Raspberry Pi 3" /proc/cpuinfo; then
uci set wireless.@wifi-iface[0].ssid='friWrt_5g'
uci set wireless.@wifi-device[0].channel='161'
uci set wireless.@wifi-device[0].channel='149'
uci set wireless.radio0.htmode='HT40'
uci set wireless.radio0.band='5g'
else
uci set wireless.@wifi-iface[0].ssid='friWrt_2g'
uci set wireless.@wifi-device[0].channel='1'
uci set wireless.@wifi-device[0].band='2g'
fi
uci commit wireless
wifi up >/dev/null 2>&1
if ! grep -q "wifi up" /etc/rc.local; then
sed -i '/exit 0/i wifi up' /etc/rc.local
wifi reload && wifi up
if iw dev | grep -q Interface; then
if ! grep -q "wifi up" /etc/rc.local; then
sed -i '/exit 0/i # remove if you dont use wireless' /etc/rc.local
sed -i '/exit 0/i sleep 10 && wifi up' /etc/rc.local
fi
if ! grep -q "wifi up" /etc/crontabs/root; then
echo "# remove if you dont use wireless" >> /etc/crontabs/root
echo "0 */12 * * * wifi down && sleep 5 && wifi up" >> /etc/crontabs/root
service cron restart
fi
else
echo "No wireless device detected."
fi

# custom repo and Disable opkg signature check
Expand Down Expand Up @@ -138,6 +154,7 @@ uci set nlbwmon.@nlbwmon[0].database_directory='/etc/nlbwmon'
uci set nlbwmon.@nlbwmon[0].commit_interval='3h'
uci set nlbwmon.@nlbwmon[0].refresh_interval='60s'
uci commit nlbwmon
bash /etc/init.d/nlbwmon restart

# setup auto vnstat database backup
chmod +x /etc/init.d/vnstat_backup
Expand Down Expand Up @@ -191,15 +208,20 @@ else
service internet-detector restart
fi

# configurating neko
if opkg list-installed | grep luci-app-neko > /dev/null; then
chmod +x /etc/neko/core/mihomo
fi

# adding new line for enable i2c oled display
if grep -q "Raspberry Pi 4" /proc/cpuinfo; then
if grep -q "Raspberry Pi 4\|Raspberry Pi 3" /proc/cpuinfo; then
echo -e "\ndtparam=i2c1=on\ndtparam=spi=on\ndtparam=i2s=on" >> /boot/config.txt
fi

# enable adguardhome
chmod +x /usr/bin/adguardhome
#bash /usr/bin/adguardhome enable_agh

echo "All first boot setup done!"
echo "All first boot setup complete!"

exit 0
Loading

0 comments on commit c45a808

Please sign in to comment.