初期設定ツール
※こちらに統合しました
はじめに
初心者対応構成
- スクリプトでの自動設定
-
UCI (ttyd)、Webコンソール (LuCi)、ファイラー (SFTP)にて比較作業がおススメ
デバイスアクセス
PowerShellの開始
- キー入力:
Win+x>a>はい
パワーシェル7のインストールとショートカット作成
$currentVersion = $PSVersionTable.PSVersion
Write-Host "Current PowerShell version: $($currentVersion)"
$installed = Get-Command pwsh -ErrorAction SilentlyContinue
if ($installed) {
Write-Host "PowerShell 7 is already installed. Skipping installation."
} else {
Write-Host "Installing PowerShell 7..."
$url = "https://aka.ms/install-powershell.ps1"
Invoke-WebRequest -Uri $url -OutFile "install-powershell.ps1"
.\install-powershell.ps1
Write-Host "PowerShell 7 installation completed."
}
$desktop = [Environment]::GetFolderPath("Desktop")
$shortcutPath = "$desktop\PowerShell 7 (Admin).lnk"
$targetPath = "C:\Program Files\PowerShell\7\pwsh.exe"
$arguments = "-Command Start-Process pwsh -Verb runAs"
$shell = New-Object -ComObject WScript.Shell
$shortcut = $shell.CreateShortcut($shortcutPath)
$shortcut.TargetPath = $targetPath
$shortcut.Arguments = $arguments
$shortcut.Description = "PowerShell 7 Administrator Shortcut"
$shortcut.WorkingDirectory = "$HOME"
$shortcut.IconLocation = $targetPath
$shortcut.Save()
Write-Host "PowerShell 7 administrator shortcut has been created."
UCI(SSH)アクセス
ssh -o StrictHostKeyChecking=no -oHostKeyAlgorithms=+ssh-rsa root@192.168.1.1
- root@192.168.1.1's password:
初期値:パスワード無し
OpenSSHのインストールが無い場合
- 機能の確認
※Windows 10 Fall Creators Update(1709)以降標準搭載
Get-WindowsCapability -Online | Where-Object Name -like 'OpenSSH*'
- 機能のインストール
Add-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0
インストール
インストールは目的で取捨選択
アップデート
- 最初必須
※アップデート情報は再起動でリセット
opkg update
UPDATE="1"
非推奨
opkg list-upgradable | cut -f 1 -d ' ' | xargs opkg upgrade
Webコンソール(LuCi)
リリースビルド(RC含む)は不要
#! /bin/sh
if [ -e ${UPDATE} ]; then
opkg update
UPDATE="1"
fi
opkg install luci
LuCi日本語化
#! /bin/sh
if [ -e ${UPDATE} ]; then
opkg update
UPDATE="1"
fi
opkg install luci-i18n-base-ja
opkg install luci-i18n-opkg-ja #v24から廃止
opkg install luci-i18n-firewall-ja #v24から自動
-
ブラウザ:
192.168.1.1- ユーザー名:
root - パスワード:
設定したパスワード
- ユーザー名:
Dashboard
#! /bin/sh
if [ -e ${UPDATE} ]; then
opkg update
UPDATE="1"
fi
opkg install luci-mod-dashboard
opkg install luci-i18n-dashboard-ja
UCI(TTYD)
WEBからSSHが使える
かなり便利
#! /bin/sh
if [ -e ${UPDATE} ]; then
opkg update
UPDATE="1"
fi
opkg install luci-app-ttyd
opkg install luci-i18n-ttyd-ja
uci set ttyd.@ttyd[0]=ttyd
uci set ttyd.@ttyd[0].interface='@lan'
# uci set ttyd.@ttyd[0].command='/bin/login -f root ' # 自動ログイン
uci set ttyd.@ttyd[0].ipv6='1'
uci set ttyd.@ttyd[0].debug='7'
uci set ttyd.@ttyd[0].url_arg='1'
uci commit ttyd
service ttyd restart
/etc/init.d/rpcd restart
TTYDログイン
-
ブラウザ:
192.168.1.1:7681- ユーザー名:
root - パスワード:
設定したパスワード
- ユーザー名:
ファイラー (SFTP)
#! /bin/sh
opkg update
opkg install openssh-sftp-server
- クライアント設定(WIndows)
- 手動インストール
- ダウンロード:WinSCP
- 手動インストール
自動インストール
- キー入力:
Win+x>a>はい - 最新版ソフトウェアのインストール
$psVersion = $PSVersionTable.PSVersion.Major
$LINKS = Invoke-WebRequest "https://winscp.net/eng/download.php"
$LINKS_VERSION = $LINKS.Links | Where-Object {$_.href -like "*WinSCP-*-Setup.exe*"} | Select-Object -ExpandProperty href
$VERSION = ($LINKS_VERSION -split '/')[-2] -replace "WinSCP-([0-9]+\.[0-9]+\.[0-9]+).*", '$1'
Write-Host "Version to install: $VERSION"
$downloadUrl = "https://jaist.dl.sourceforge.net/project/winscp/WinSCP/$VERSION/WinSCP-$VERSION-Setup.exe?viasf=1"
Write-Host "Downloading from: $downloadUrl"
$ONAMAE = (whoami).Split('\')[1]
$destinationPath = "C:\Users\$ONAMAE\Downloads\WinSCP-$VERSION-Setup.exe"
Invoke-WebRequest -Uri $downloadUrl -OutFile $destinationPath
Write-Host "Installing WinSCP..."
Start-Process -FilePath $destinationPath -ArgumentList "/VERYSILENT /NORESTART" -Wait
Invoke-Expression "C:\Users\$ONAMAE\AppData\Local\Programs\WinSCP\WinSCP.exe"
-
警告>強制的に貼り付け - WinSCP設定
- セッション
- ホスト名:
192.168.1.1 - ユーザー名:
root - パスワード:
設定したパスワード -
ログインをクリック
- ホスト名:
- セッション
ファイラー (filebrowser)
mkdir -p /tmp/aios && cd /tmp/aios && wget -q -O install-filebrowser.sh https://raw.githubusercontent.com/site-u2023/aios/main/install-filebrowser.sh && sh install-filebrowser.sh
-
管理画面 (初期値)
Web Interface: http://192.168.0.1:8080/
Username:admin
Password:admin12345678 -
設定 (修正中:ブラウザから変更してください)
PORT="8080" # ポート
ROOT="admin" # ユーザー名
PASSWORD="admin12345678" # パスワード (12文字以上必須)
LOCALE="ja" # 言語
uci set filebrowser.config.port=${PORT}
uci set filebrowser.config.username=${ROOT}
uci set filebrowser.config.password=${PASSWORD}
uci set filebrowser.config.locale=${LOCALE}
uci commit filebrowser
service filebrowser restart
uci show filebrowser
- 使用方法
script.sh : 自動判定:インストールまたはリムーブ
script.sh install : 強制インストール
script.sh remove : 強制削除
script.sh status : 状態確認
※/etc/config/filebrowserのパスワードは12文字以上必須
CPU負荷分散
4コアシステム以上でより有効
※全体的なパフォーマンスが向上し、さらには消費電力が削減される可能性があります
※2core ターゲットでは、ベンチマークのみを除くと、パフォーマンスが低下する可能性があります
#! /bin/sh
if [ -e ${UPDATE} ]; then
opkg update
UPDATE="1"
fi
opkg install irqbalance
uci set irqbalance.irqbalance=irqbalance
uci set irqbalance.irqbalance.enabled='1'
uci commit irqbalance
/etc/init.d/irqbalance start
SQM(Smart Queue Management)
WAN側帯域コントローラー
★スナップショット必須
※リリースビルドも効果大
※要チューニング
#! /bin/sh
DOWNLOAD='0' #初期値
UPLOAD='0' #初期値
if [ -e ${UPDATE} ]; then
opkg update
UPDATE="1"
fi
opkg install luci-app-sqm
opkg install luci-i18n-sqm-ja
. /lib/functions/network.sh
network_flush_cache
network_find_wan6 NET_IF6
network_get_physdev NET_L2D6 "${NET_IF6}"
uci set sqm.@queue[0].enabled='1'
uci set sqm.@queue[0].interface=${NET_L2D6}
uci set sqm.@queue[0].download=${DOWNLOAD}
uci set sqm.@queue[0].upload=${UPLOAD}
uci commit sqm
/etc/init.d/sqm start
/etc/init.d/sqm enable
# reboot
QoS(Network Traffic Control)
LAN側帯域コントローラー
#! /bin/sh
if [ -e ${UPDATE} ]; then
opkg update
UPDATE="1"
fi
opkg install tc-full
opkg install luci-app-qos
opkg install luci-i18n-qos-ja
# reboot
ネットワーク統計インターフェイス
#! /bin/sh
if [ -e ${UPDATE} ]; then
opkg update
UPDATE="1"
fi
opkg install luci-i18n-statistics-ja
/etc/init.d/collectd enable
/etc/init.d/rpcd restart
帯域幅モニター
#! /bin/sh
if [ -e ${UPDATE} ]; then
opkg update
UPDATE="1"
fi
opkg install luci-i18n-nlbwmon-ja
# reboot
WiFiスケジュール
WiFi制御
#! /bin/sh
if [ -e ${UPDATE} ]; then
opkg update
UPDATE="1"
fi
opkg install wifischedule
opkg install luci-app-wifischedule
opkg install luci-i18n-wifischedule-ja
追加テーマ
#! /bin/sh
if [ -e ${UPDATE} ]; then
opkg update
UPDATE="1"
fi
# OpnWrt
opkg install luci-theme-openwrt
# マテリアル
opkg install luci-theme-material
# モダン
opkg install luci-theme-openwrt-2020
Attended Sysupgrade
自動アップグレード
#! /bin/sh
if [ -e ${UPDATE} ]; then
opkg update
UPDATE="1"
fi
opkg install attendedsysupgrade-common
opkg install luci-app-attendedsysupgrade
opkg install luci-i18n-attendedsysupgrade-ja
opkg install auc
カスタム フィード gSpotx2f
現在のバージョン
※カスタムフィードに関し、配布元の構成変更が頻繁にある為、インストール出来ない事場合、適弁コマンドを修正下さい
また依頼あれば対応します
- ログ情報
- CPUステータス
- CPUパフォーマンス
- 温度センサー
- インターネット可用性確認
- モデム再起動モジュール
- 電子メール通知モジュール
{
#!/bin/sh
OPENWRT_RELEASE=$(grep 'DISTRIB_RELEASE' /etc/openwrt_release | cut -d"'" -f2 | cut -c 1-2)
case "$OPENWRT_RELEASE" in
19|20|21|22|23|24|SN)
echo -e "The version of this device is \033[1;33m$OPENWRT_RELEASE\033[0;39m"
echo -e "Version Check: \033[1;36mOK\033[0;39m"
;;
*)
echo "Incompatible version."
return 1
;;
esac
get_package_name() {
local package_pattern="$1"
local api_url="https://api.github.com/repos/gSpotx2f/packages-openwrt/contents/current"
local response=$(wget --no-check-certificate -q -O - "$api_url")
local package_name=$(echo "$response" | jsonfilter -e '@[*].name' | grep "${package_pattern}.*\.ipk" | head -n1)
if [ -z "$package_name" ]; then
echo "[ERROR] Not found: $package_pattern"
else
echo "$package_name"
fi
}
echo "Fetching package list from GitHub API..."
LOG_VIEWER=$(get_package_name "luci-app-log-viewer")
CPU_STATUS=$(get_package_name "luci-app-cpu-status")
CPU_PERF=$(get_package_name "luci-app-cpu-perf")
TEMP_STATUS=$(get_package_name "luci-app-temp-status")
INTERNET_DETECTOR=$(get_package_name "internet-detector_")
INTERNET_DETECTOR_APP=$(get_package_name "luci-app-internet-detector")
INTERNET_DETECTOR_MODEM=$(get_package_name "internet-detector-mod-modem")
INTERNET_DETECTOR_EMAIL=$(get_package_name "internet-detector-mod-email")
DISKA_INFO=$(get_package_name "luci-app-disks-info")
echo ""
echo "Current Version -------------------------"
echo "${LOG_VIEWER}"
echo "${CPU_STATUS}"
echo "${CPU_PERF}"
echo "${TEMP_STATUS}"
echo "${INTERNET_DETECTOR}"
echo "${INTERNET_DETECTOR_APP}"
echo "${INTERNET_DETECTOR_MODEM}"
echo "${INTERNET_DETECTOR_EMAIL}"
echo "${DISKA_INFO}"
echo "-----------------------------------------"
}
ログ情報
#!/bin/sh
PACKAGE_PATTERN="luci-app-log-viewer"
EXCLUDE_PATTERN=""
API_URL="https://api.github.com/repos/gSpotx2f/packages-openwrt/contents/current"
DOWNLOAD_BASE_URL="https://raw.githubusercontent.com/gSpotx2f/packages-openwrt/master/current"
TMP_DIR="/tmp"
OPENWRT_RELEASE=$(grep 'DISTRIB_RELEASE' /etc/openwrt_release | cut -d"'" -f2 | cut -c 1-2)
case "$OPENWRT_RELEASE" in
19|20|21|22|23|24|SN)
echo -e " The version of this device is \033[1;33m$OPENWRT_RELEASE\033[0;39m"
echo -e " Version Check: \033[1;36mOK\033[0;39m"
;;
*)
echo " Exit due to incompatible version"
exit 1
;;
esac
echo ""
echo "Fetching package information for: ${PACKAGE_PATTERN}"
RESPONSE=$(wget --no-check-certificate -q -O - "$API_URL")
if [ -n "$EXCLUDE_PATTERN" ]; then
PACKAGE_NAME=$(echo "$RESPONSE" | jsonfilter -e '@[*].name' | grep "${PACKAGE_PATTERN}.*\.ipk" | grep -v "${EXCLUDE_PATTERN}" | head -n1)
else
PACKAGE_NAME=$(echo "$RESPONSE" | jsonfilter -e '@[*].name' | grep "${PACKAGE_PATTERN}.*\.ipk" | head -n1)
fi
if [ -z "$PACKAGE_NAME" ]; then
echo "[ERROR] Package not found: ${PACKAGE_PATTERN}"
exit 1
fi
echo "Found: ${PACKAGE_NAME}"
wget --no-check-certificate -O ${TMP_DIR}/luci-app-temp-status_all.ipk ${DOWNLOAD_BASE_URL}/${PACKAGE_NAME}
if [ $? -eq 0 ]; then
opkg install ${TMP_DIR}/luci-app-temp-status_all.ipk
rm ${TMP_DIR}/luci-app-temp-status_all.ipk
echo "Installation completed: ${PACKAGE_NAME}"
else
echo "[ERROR] Download failed: ${PACKAGE_NAME}"
exit 1
fi
CPUステータス
CPUの使用率等リアルタイム表示
#!/bin/sh
PACKAGE_PATTERN="luci-app-cpu-status"
EXCLUDE_PATTERN="luci-app-cpu-status-mini"
API_URL="https://api.github.com/repos/gSpotx2f/packages-openwrt/contents/current"
DOWNLOAD_BASE_URL="https://raw.githubusercontent.com/gSpotx2f/packages-openwrt/master/current"
TMP_DIR="/tmp"
OPENWRT_RELEASE=$(grep 'DISTRIB_RELEASE' /etc/openwrt_release | cut -d"'" -f2 | cut -c 1-2)
case "$OPENWRT_RELEASE" in
19|20|21|22|23|24|SN)
echo -e " The version of this device is \033[1;33m$OPENWRT_RELEASE\033[0;39m"
echo -e " Version Check: \033[1;36mOK\033[0;39m"
;;
*)
echo " Exit due to incompatible version"
exit 1
;;
esac
echo ""
echo "Fetching package information for: ${PACKAGE_PATTERN}"
RESPONSE=$(wget --no-check-certificate -q -O - "$API_URL")
PACKAGE_NAME=$(echo "$RESPONSE" | jsonfilter -e '@[*].name' | grep "${PACKAGE_PATTERN}.*\.ipk" | grep -v "${EXCLUDE_PATTERN}" | head -n1)
if [ -z "$PACKAGE_NAME" ]; then
echo "[ERROR] Package not found: ${PACKAGE_PATTERN}"
exit 1
fi
echo "Found: ${PACKAGE_NAME}"
wget --no-check-certificate -O ${TMP_DIR}/luci-app-cpu-status_all.ipk ${DOWNLOAD_BASE_URL}/${PACKAGE_NAME}
if [ $? -eq 0 ]; then
opkg install ${TMP_DIR}/luci-app-cpu-status_all.ipk
rm ${TMP_DIR}/luci-app-cpu-status_all.ipk
echo "Installation completed: ${PACKAGE_NAME}"
else
echo "[ERROR] Download failed: ${PACKAGE_NAME}"
exit 1
fi
CPUパフォーマンス
CPUのパフォーマンスコントローラー
#!/bin/sh
PACKAGE_PATTERN="luci-app-cpu-perf"
EXCLUDE_PATTERN=""
API_URL="https://api.github.com/repos/gSpotx2f/packages-openwrt/contents/current"
DOWNLOAD_BASE_URL="https://raw.githubusercontent.com/gSpotx2f/packages-openwrt/master/current"
TMP_DIR="/tmp"
OPENWRT_RELEASE=$(grep 'DISTRIB_RELEASE' /etc/openwrt_release | cut -d"'" -f2 | cut -c 1-2)
case "$OPENWRT_RELEASE" in
19|20|21|22|23|24|SN)
echo -e " The version of this device is \033[1;33m$OPENWRT_RELEASE\033[0;39m"
echo -e " Version Check: \033[1;36mOK\033[0;39m"
;;
*)
echo " Exit due to incompatible version"
exit 1
;;
esac
echo ""
echo "Fetching package information for: ${PACKAGE_PATTERN}"
RESPONSE=$(wget --no-check-certificate -q -O - "$API_URL")
if [ -n "$EXCLUDE_PATTERN" ]; then
PACKAGE_NAME=$(echo "$RESPONSE" | jsonfilter -e '@[*].name' | grep "${PACKAGE_PATTERN}.*\.ipk" | grep -v "${EXCLUDE_PATTERN}" | head -n1)
else
PACKAGE_NAME=$(echo "$RESPONSE" | jsonfilter -e '@[*].name' | grep "${PACKAGE_PATTERN}.*\.ipk" | head -n1)
fi
if [ -z "$PACKAGE_NAME" ]; then
echo "[ERROR] Package not found: ${PACKAGE_PATTERN}"
exit 1
fi
echo "Found: ${PACKAGE_NAME}"
wget --no-check-certificate -O ${TMP_DIR}/luci-app-cpu-perf_all.ipk ${DOWNLOAD_BASE_URL}/${PACKAGE_NAME}
if [ $? -eq 0 ]; then
opkg install ${TMP_DIR}/luci-app-cpu-perf_all.ipk
rm ${TMP_DIR}/luci-app-cpu-perf_all.ipk
echo "Installation completed: ${PACKAGE_NAME}"
else
echo "[ERROR] Download failed: ${PACKAGE_NAME}"
exit 1
fi
温度センサー
デバイス各センサーのリアルタイム表示
#!/bin/sh
PACKAGE_PATTERN="luci-app-temp-status"
EXCLUDE_PATTERN=""
API_URL="https://api.github.com/repos/gSpotx2f/packages-openwrt/contents/current"
DOWNLOAD_BASE_URL="https://raw.githubusercontent.com/gSpotx2f/packages-openwrt/master/current"
TMP_DIR="/tmp"
OPENWRT_RELEASE=$(grep 'DISTRIB_RELEASE' /etc/openwrt_release | cut -d"'" -f2 | cut -c 1-2)
case "$OPENWRT_RELEASE" in
19|20|21|22|23|24|SN)
echo -e " The version of this device is \033[1;33m$OPENWRT_RELEASE\033[0;39m"
echo -e " Version Check: \033[1;36mOK\033[0;39m"
;;
*)
echo " Exit due to incompatible version"
exit 1
;;
esac
echo ""
echo "Fetching package information for: ${PACKAGE_PATTERN}"
RESPONSE=$(wget --no-check-certificate -q -O - "$API_URL")
if [ -n "$EXCLUDE_PATTERN" ]; then
PACKAGE_NAME=$(echo "$RESPONSE" | jsonfilter -e '@[*].name' | grep "${PACKAGE_PATTERN}.*\.ipk" | grep -v "${EXCLUDE_PATTERN}" | head -n1)
else
PACKAGE_NAME=$(echo "$RESPONSE" | jsonfilter -e '@[*].name' | grep "${PACKAGE_PATTERN}.*\.ipk" | head -n1)
fi
if [ -z "$PACKAGE_NAME" ]; then
echo "[ERROR] Package not found: ${PACKAGE_PATTERN}"
exit 1
fi
echo "Found: ${PACKAGE_NAME}"
wget --no-check-certificate -O ${TMP_DIR}/luci-app-temp-status_all.ipk ${DOWNLOAD_BASE_URL}/${PACKAGE_NAME}
if [ $? -eq 0 ]; then
opkg install ${TMP_DIR}/luci-app-temp-status_all.ipk
rm ${TMP_DIR}/luci-app-temp-status_all.ipk
echo "Installation completed: ${PACKAGE_NAME}"
else
echo "[ERROR] Download failed: ${PACKAGE_NAME}"
exit 1
fi
インターネット可用性確認
#!/bin/sh
PACKAGE_PATTERN="internet-detector_"
PACKAGE_PATTERN_UI="luci-app-internet-detector"
EXCLUDE_PATTERN=""
RUN_OPKG_UPDATE="0"
API_URL="https://api.github.com/repos/gSpotx2f/packages-openwrt/contents/current"
DOWNLOAD_BASE_URL="https://raw.githubusercontent.com/gSpotx2f/packages-openwrt/master/current"
TMP_DIR="/tmp"
OPENWRT_RELEASE=$(grep 'DISTRIB_RELEASE' /etc/openwrt_release | cut -d"'" -f2 | cut -c 1-2)
case "$OPENWRT_RELEASE" in
19|20|21|22|23|24|SN)
echo -e " The version of this device is \033[1;33m$OPENWRT_RELEASE\033[0;39m"
echo -e " Version Check: \033[1;36mOK\033[0;39m"
;;
*)
echo " Exit due to incompatible version"
exit 1
;;
esac
if [ "$RUN_OPKG_UPDATE" = "1" ]; then
opkg update
fi
echo ""
echo "Fetching package information..."
RESPONSE=$(wget --no-check-certificate -q -O - "$API_URL")
PACKAGE_NAME=$(echo "$RESPONSE" | jsonfilter -e '@[*].name' | grep "${PACKAGE_PATTERN}.*\.ipk" | head -n1)
if [ -z "$PACKAGE_NAME" ]; then
echo "[ERROR] Package not found: ${PACKAGE_PATTERN}"
exit 1
fi
echo "Found: ${PACKAGE_NAME}"
wget --no-check-certificate -O ${TMP_DIR}/internet-detector_all.ipk ${DOWNLOAD_BASE_URL}/${PACKAGE_NAME}
if [ $? -eq 0 ]; then
opkg install ${TMP_DIR}/internet-detector_all.ipk
rm ${TMP_DIR}/internet-detector_all.ipk
/etc/init.d/internet-detector enable
echo "Installation completed: ${PACKAGE_NAME}"
else
echo "[ERROR] Download failed: ${PACKAGE_NAME}"
exit 1
fi
PACKAGE_NAME_UI=$(echo "$RESPONSE" | jsonfilter -e '@[*].name' | grep "${PACKAGE_PATTERN_UI}.*\.ipk" | head -n1)
if [ -z "$PACKAGE_NAME_UI" ]; then
echo "[ERROR] Package not found: ${PACKAGE_PATTERN_UI}"
exit 1
fi
echo "Found: ${PACKAGE_NAME_UI}"
wget --no-check-certificate -O ${TMP_DIR}/luci-app-internet-detector_all.ipk ${DOWNLOAD_BASE_URL}/${PACKAGE_NAME_UI}
if [ $? -eq 0 ]; then
opkg install ${TMP_DIR}/luci-app-internet-detector_all.ipk
rm ${TMP_DIR}/luci-app-internet-detector_all.ipk
echo "Installation completed: ${PACKAGE_NAME_UI}"
else
echo "[ERROR] Download failed: ${PACKAGE_NAME_UI}"
exit 1
fi
#!/bin/sh
PACKAGE_PATTERN="internet-detector-mod-modem"
EXCLUDE_PATTERN=""
API_URL="https://api.github.com/repos/gSpotx2f/packages-openwrt/contents/current"
DOWNLOAD_BASE_URL="https://raw.githubusercontent.com/gSpotx2f/packages-openwrt/master/current"
TMP_DIR="/tmp"
OPENWRT_RELEASE=$(grep 'DISTRIB_RELEASE' /etc/openwrt_release | cut -d"'" -f2 | cut -c 1-2)
case "$OPENWRT_RELEASE" in
19|20|21|22|23|24|SN)
echo -e " The version of this device is \033[1;33m$OPENWRT_RELEASE\033[0;39m"
echo -e " Version Check: \033[1;36mOK\033[0;39m"
;;
*)
echo " Exit due to incompatible version"
exit 1
;;
esac
echo ""
echo "Fetching package information for: ${PACKAGE_PATTERN}"
RESPONSE=$(wget --no-check-certificate -q -O - "$API_URL")
if [ -n "$EXCLUDE_PATTERN" ]; then
PACKAGE_NAME=$(echo "$RESPONSE" | jsonfilter -e '@[*].name' | grep "${PACKAGE_PATTERN}.*\.ipk" | grep -v "${EXCLUDE_PATTERN}" | head -n1)
else
PACKAGE_NAME=$(echo "$RESPONSE" | jsonfilter -e '@[*].name' | grep "${PACKAGE_PATTERN}.*\.ipk" | head -n1)
fi
if [ -z "$PACKAGE_NAME" ]; then
echo "[ERROR] Package not found: ${PACKAGE_PATTERN}"
exit 1
fi
echo "Found: ${PACKAGE_NAME}"
wget --no-check-certificate -O ${TMP_DIR}/internet-detector-mod-modem-restart_all.ipk ${DOWNLOAD_BASE_URL}/${PACKAGE_NAME}
if [ $? -eq 0 ]; then
opkg install ${TMP_DIR}/internet-detector-mod-modem-restart_all.ipk
rm ${TMP_DIR}/internet-detector-mod-modem-restart_all.ipk
/etc/init.d/internet-detector restart
echo "Installation completed: ${PACKAGE_NAME}"
else
echo "[ERROR] Download failed: ${PACKAGE_NAME}"
exit 1
fi
#!/bin/sh
PACKAGE_PATTERN="internet-detector-mod-email"
EXCLUDE_PATTERN=""
API_URL="https://api.github.com/repos/gSpotx2f/packages-openwrt/contents/current"
DOWNLOAD_BASE_URL="https://raw.githubusercontent.com/gSpotx2f/packages-openwrt/master/current"
TMP_DIR="/tmp"
OPENWRT_RELEASE=$(grep 'DISTRIB_RELEASE' /etc/openwrt_release | cut -d"'" -f2 | cut -c 1-2)
case "$OPENWRT_RELEASE" in
19|20|21|22|23|24|SN)
echo -e " The version of this device is \033[1;33m$OPENWRT_RELEASE\033[0;39m"
echo -e " Version Check: \033[1;36mOK\033[0;39m"
;;
*)
echo " Exit due to incompatible version"
exit 1
;;
esac
echo ""
echo "Fetching package information for: ${PACKAGE_PATTERN}"
RESPONSE=$(wget --no-check-certificate -q -O - "$API_URL")
if [ -n "$EXCLUDE_PATTERN" ]; then
PACKAGE_NAME=$(echo "$RESPONSE" | jsonfilter -e '@[*].name' | grep "${PACKAGE_PATTERN}.*\.ipk" | grep -v "${EXCLUDE_PATTERN}" | head -n1)
else
PACKAGE_NAME=$(echo "$RESPONSE" | jsonfilter -e '@[*].name' | grep "${PACKAGE_PATTERN}.*\.ipk" | head -n1)
fi
if [ -z "$PACKAGE_NAME" ]; then
echo "[ERROR] Package not found: ${PACKAGE_PATTERN}"
exit 1
fi
echo "Found: ${PACKAGE_NAME}"
wget --no-check-certificate -O ${TMP_DIR}/internet-detector-mod-email_all.ipk ${DOWNLOAD_BASE_URL}/${PACKAGE_NAME}
if [ $? -eq 0 ]; then
opkg install ${TMP_DIR}/internet-detector-mod-email_all.ipk
rm ${TMP_DIR}/internet-detector-mod-email_all.ipk
/etc/init.d/internet-detector restart
echo "Installation completed: ${PACKAGE_NAME}"
else
echo "[ERROR] Download failed: ${PACKAGE_NAME}"
exit 1
fi
カスタムフィード ARGON
テーマ ARGON (テンプレート)
※Chrome ブラウザを強くお勧めします。このテーマではいくつかの新しい css3 機能が使用されていますが、現時点で最も互換性が高いのは Chrome のみです。
#! /bin/sh
ARGON_VERSION='2.3.1'
if [ -e ${UPDATE} ]; then
opkg update
UPDATE="1"
fi
opkg install luci-compat
opkg install luci-lib-ipkg
wget --no-check-certificate -O /tmp/luci-theme-argon.ipk https://github.com/jerrykuku/luci-theme-argon/releases/download/v${ARGON_VERSION}/luci-theme-argon_${ARGON_VERSION}_all.ipk
opkg install /tmp/luci-theme-argon.ipk
rm /tmp/luci-theme-argon.ipk
/etc/init.d/rpcd restart
テーマ EDGE
#! /bin/sh
if [ -e ${UPDATE} ]; then
opkg update
UPDATE="1"
fi
wget --no-check-certificate -O /tmp/luci-theme-edge.ipk https://github.com/noct99/blog.vpngame.com/raw/main/luci-theme-edge.ipk
opkg install /tmp/luci-theme-edge.ipk
rm /tmp/luci-theme-edge.ipk
/etc/init.d/rpcd restart
テーマ OPENTOMATO
#! /bin/sh
if [ -e ${UPDATE} ]; then
opkg update
UPDATE="1"
fi
wget --no-check-certificate -O /tmp/luci-theme-opentomato.ipk https://github.com/noct99/blog.vpngame.com/raw/main/luci-theme-opentomato.ipk
opkg install /tmp/luci-theme-opentomato.ipk
rm /tmp/luci-theme-opentomato.ipk
/etc/init.d/rpcd restart
テーマ TANO
#! /bin/sh
if [ -e ${UPDATE} ]; then
opkg update
UPDATE="1"
fi
wget --no-check-certificate -O /tmp/luci-theme-tano.ipk https://github.com/noct99/blog.vpngame.com/raw/main/luci-theme-tano.ipk
opkg install /tmp/luci-theme-tano.ipk
rm /tmp/luci-theme-tano.ipk
/etc/init.d/rpcd restart
パッケージ確認
他デバイス設定
WAN
選択型インターネット接続自動設定
階層
※それぞれの階層に設定とその復元がある
※一度設定すると、そのバックアップを取るので、復元が出来る仕様
- OCNバーチャルコネクト
- ニチバン対策のみ
- V6プラス・IPv6オプション
- ニチバン対策のみ
- トランジックス
- クロスパス
- v6 コネクト
- ひかりone系・他PPPoE
- アクセスポイント
- 終了
初期化
ファクトリーリセット(初期化)
# 要注意
firstboot && reboot now
This will erase all settings and remove any installed packages. Are you sure? [N/y]
y
デバイスリセットボタン
デバイスのリセットボタンを5秒押し続ける




