├── .DS_Store ├── .github └── ISSUE_TEMPLATE │ ├── bug_report.md │ └── feature_request.md ├── .gitmodules ├── LICENSE ├── README.md ├── add-submodule.sh ├── extra-updateScripts ├── .DS_Store ├── 7寸盒Wi-Fi驱动补丁安装教程(更新).docx ├── Change-Github-to-Gitee-And-Hard-update-dashboard.sh ├── Change-MW0MWZ-Bin-Support-V3F4-And-Hard-update-bin.sh ├── Change-MW0MWZ-Bin-github-to-gitee-v4.2.0-And-Hard-update-bin.sh ├── Change-MW0MWZ-github-to-mirror_gitee-And-Hard-update-bin.sh ├── Install_NextionDriver.sh ├── J-STAR-OS-Patch_Fix_v2.3_rustdesk_same-ID-issue.sh ├── NanoPi-NEO-USB-Wi-Fi驱动补丁安装教程.docx ├── Patch_Add_BM4601_47.100.76.205_To_ServerList.sh ├── Patch_Add_FreeDMR_China_Local_127.0.0.1_To_ServerList.sh ├── Patch_Add_FreeDMR_China_Local_192.168.2.33_To_ServerList.sh ├── Patch_Add_FreeDMR_China_Local_192.168.2.93_To_ServerList.sh ├── Patch_Add_FreeDMR_China_Local_192.168.31.118_To_ServerList.sh ├── Patch_Add_FreeDMR_China_Local_To_ServerList.sh ├── Patch_Add_FullEdit_MMDVMHost_to-MW0MWZ_PI-STAR_V_4.2.0.sh ├── Patch_Add_HDMI_Chrome_AutoStart_BPiM2.sh ├── Patch_Add_HDMI_Chrome_AutoStart_RPi5B2W.sh ├── Patch_Add_XLX_JTA_To_List.sh ├── Patch_Change_CSS_to_GrayColor.sh ├── Patch_Change_CSS_to_PinkColor.sh ├── Patch_Disable-WiFi-MAC-Randomization.sh ├── Patch_Disable_Dhcpcd_verbose_log_BPiM2.sh ├── Patch_FIX_I2C_OLED_NOT_ENABLE.sh ├── Patch_Fix_ASL-3in1-OS-SSL_Certs_not_update_bug.sh ├── Patch_Fix_P25GatewayConfig.sh ├── Patch_Fix_apt_sources_list_2PCS_raspbian_Segments.sh ├── Patch_HDMI_Chrome_Change_Full.sh ├── Patch_HDMI_Chrome_Change_LiveCaller.sh ├── Patch_HDMI_Chrome_Change_Simple.sh ├── Patch_HDMI_Chrome_Close.sh ├── Patch_Install_Zip_if_Not_exist.sh ├── Patch_Modify_DMRGateway-FreeDMR_Host.sh ├── Patch_Remove_OS_Unattended_upgrades.sh ├── Patch_Set_CN_LanguageAndTimeZone.sh ├── Patch_Set_EN_LanguageAndTimeZone.sh ├── Patch_Support_HDMI_1080p_FullScrean_BPiM2.sh ├── Patch_Support_HDMI_1080p_FullScrean_RPi4B.sh ├── Patch_Support_HDMI_1080p_FullScrean_RPi4B_BD7EM.sh ├── Patch_Support_RPi5B.sh ├── Patch_ZeroW_Open_CallerDetails.sh ├── Recover-Gitee-to-3.4.17-github.sh ├── Recovery-Github-from-Gitee.sh ├── Recovery-MW0MWZ-Bin-Github-And-Hard-update-bin.sh ├── Recovery-MW0MWZ-Bin-github-to-gitee-V3F4-And-Hard-update-bin.sh ├── Recovery-apt-list-from-tsinghua.sh ├── Remove_NextionDriver.sh ├── Setup-pistar-watchdog-WiFi-Keep-Alive.sh ├── Setup-pistar-watchdog-WiFi-Keep-Alive_NEO.sh ├── Update-Pi-Star-OS-Ignore-Local-Changed.sh ├── Update-Pi-Star-OS.sh ├── _delPatch_Add_HDMI_Chrome_Full.sh ├── _delPatch_Add_HDMI_Chrome_Simple.sh ├── change-Github-to-Gitee.sh ├── change-Github-to-Gitee2.sh ├── patch │ └── MW0MWZ │ │ ├── fulledit_mmdvmhost.inc │ │ └── header-menu.inc ├── pistar-css-Color_pink.ini ├── pistar-css_Gray.ini ├── pistar-watchdog-WiFi-Keep-Alive.sh ├── pistar-watchdog-WiFi-Keep-Alive_NEO.sh ├── update-NextionDriver-DMRId.sh ├── update-NextionDriver-DMRId_ORG.sh ├── update_Pi-Star_DMRIdAndHosts-bh7jtb.sh ├── update_Pi-Star_DMRIdAndHosts.sh ├── update_Pi-Star_DMRIdAndHosts.sh-bak ├── update_Pi-Star_DMRIdAndHosts_ORG.sh ├── update_Pi-Star_MMDVMHost.sh ├── update_Pi-Star_OnlyHosts.sh └── update_Pi-Star_OnlyHosts_ORG.sh └── platformDetect-for-RPi5B-PHP8.2.sh /.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JTA-STAR/J-STAR/8756d0fc6fc3163019b28166e0f3f69a4eb2afda/.DS_Store -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Describe the bug** 11 | 12 | **logs** 13 | 14 | **Screenshots** 15 | Ctrl + V here 16 | 17 | Join our group https://groups.io/g/J-STAR/ 18 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Is your feature request related to a problem? Please describe.** 11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 12 | 13 | **Describe the solution you'd like** 14 | A clear and concise description of what you want to happen. 15 | 16 | **Describe alternatives you've considered** 17 | A clear and concise description of any alternative solutions or features you've considered. 18 | 19 | **Additional context** 20 | Add any other context or screenshots about the feature request here. 21 | 22 | **Screenshots** 23 | Ctrl + V here 24 | 25 | Join our group https://groups.io/g/J-STAR/ 26 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "J-STAR_Dash"] 2 | path = J-STAR_Dash 3 | url = https://github.com/bi7jta/W0CHP-PiStar-Dash_BPiM2.git 4 | [submodule "J-STAR_sbin"] 5 | path = J-STAR_sbin 6 | url = https://github.com/bi7jta/W0CHP-PiStar-sbin_BPiM2.git 7 | [submodule "J-STAR_bin_RPi4B"] 8 | path = J-STAR_bin_RPi4B 9 | url = https://github.com/bi7jta/BI7JTA-PiStar-bin_RPi4B.git 10 | [submodule "J-STAR_bin_BPiM2"] 11 | path = J-STAR_bin_BPiM2 12 | url = https://github.com/bi7jta/W0CHP-PiStar-bin_BPiM2.git 13 | [submodule "J-STAR_CustomBinaries-Source"] 14 | path = J-STAR_CustomBinaries-Source 15 | url = https://github.com/bi7jta/W0CHP-CustomBinaries-Source_BPiM2.git 16 | [submodule "J-STAR_X86-64"] 17 | path = J-STAR_X86-64 18 | url = https://github.com/bi7jta/Lin-Star-ALL-VisualBox.git 19 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 2, June 1991 3 | 4 | Copyright (C) 1989, 1991 Free Software Foundation, Inc., 5 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 6 | Everyone is permitted to copy and distribute verbatim copies 7 | of this license document, but changing it is not allowed. 8 | 9 | Preamble 10 | 11 | The licenses for most software are designed to take away your 12 | freedom to share and change it. By contrast, the GNU General Public 13 | License is intended to guarantee your freedom to share and change free 14 | software--to make sure the software is free for all its users. This 15 | General Public License applies to most of the Free Software 16 | Foundation's software and to any other program whose authors commit to 17 | using it. (Some other Free Software Foundation software is covered by 18 | the GNU Lesser General Public License instead.) You can apply it to 19 | your programs, too. 20 | 21 | When we speak of free software, we are referring to freedom, not 22 | price. Our General Public Licenses are designed to make sure that you 23 | have the freedom to distribute copies of free software (and charge for 24 | this service if you wish), that you receive source code or can get it 25 | if you want it, that you can change the software or use pieces of it 26 | in new free programs; and that you know you can do these things. 27 | 28 | To protect your rights, we need to make restrictions that forbid 29 | anyone to deny you these rights or to ask you to surrender the rights. 30 | These restrictions translate to certain responsibilities for you if you 31 | distribute copies of the software, or if you modify it. 32 | 33 | For example, if you distribute copies of such a program, whether 34 | gratis or for a fee, you must give the recipients all the rights that 35 | you have. You must make sure that they, too, receive or can get the 36 | source code. And you must show them these terms so they know their 37 | rights. 38 | 39 | We protect your rights with two steps: (1) copyright the software, and 40 | (2) offer you this license which gives you legal permission to copy, 41 | distribute and/or modify the software. 42 | 43 | Also, for each author's protection and ours, we want to make certain 44 | that everyone understands that there is no warranty for this free 45 | software. If the software is modified by someone else and passed on, we 46 | want its recipients to know that what they have is not the original, so 47 | that any problems introduced by others will not reflect on the original 48 | authors' reputations. 49 | 50 | Finally, any free program is threatened constantly by software 51 | patents. We wish to avoid the danger that redistributors of a free 52 | program will individually obtain patent licenses, in effect making the 53 | program proprietary. To prevent this, we have made it clear that any 54 | patent must be licensed for everyone's free use or not licensed at all. 55 | 56 | The precise terms and conditions for copying, distribution and 57 | modification follow. 58 | 59 | GNU GENERAL PUBLIC LICENSE 60 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 61 | 62 | 0. This License applies to any program or other work which contains 63 | a notice placed by the copyright holder saying it may be distributed 64 | under the terms of this General Public License. The "Program", below, 65 | refers to any such program or work, and a "work based on the Program" 66 | means either the Program or any derivative work under copyright law: 67 | that is to say, a work containing the Program or a portion of it, 68 | either verbatim or with modifications and/or translated into another 69 | language. (Hereinafter, translation is included without limitation in 70 | the term "modification".) Each licensee is addressed as "you". 71 | 72 | Activities other than copying, distribution and modification are not 73 | covered by this License; they are outside its scope. The act of 74 | running the Program is not restricted, and the output from the Program 75 | is covered only if its contents constitute a work based on the 76 | Program (independent of having been made by running the Program). 77 | Whether that is true depends on what the Program does. 78 | 79 | 1. You may copy and distribute verbatim copies of the Program's 80 | source code as you receive it, in any medium, provided that you 81 | conspicuously and appropriately publish on each copy an appropriate 82 | copyright notice and disclaimer of warranty; keep intact all the 83 | notices that refer to this License and to the absence of any warranty; 84 | and give any other recipients of the Program a copy of this License 85 | along with the Program. 86 | 87 | You may charge a fee for the physical act of transferring a copy, and 88 | you may at your option offer warranty protection in exchange for a fee. 89 | 90 | 2. You may modify your copy or copies of the Program or any portion 91 | of it, thus forming a work based on the Program, and copy and 92 | distribute such modifications or work under the terms of Section 1 93 | above, provided that you also meet all of these conditions: 94 | 95 | a) You must cause the modified files to carry prominent notices 96 | stating that you changed the files and the date of any change. 97 | 98 | b) You must cause any work that you distribute or publish, that in 99 | whole or in part contains or is derived from the Program or any 100 | part thereof, to be licensed as a whole at no charge to all third 101 | parties under the terms of this License. 102 | 103 | c) If the modified program normally reads commands interactively 104 | when run, you must cause it, when started running for such 105 | interactive use in the most ordinary way, to print or display an 106 | announcement including an appropriate copyright notice and a 107 | notice that there is no warranty (or else, saying that you provide 108 | a warranty) and that users may redistribute the program under 109 | these conditions, and telling the user how to view a copy of this 110 | License. (Exception: if the Program itself is interactive but 111 | does not normally print such an announcement, your work based on 112 | the Program is not required to print an announcement.) 113 | 114 | These requirements apply to the modified work as a whole. If 115 | identifiable sections of that work are not derived from the Program, 116 | and can be reasonably considered independent and separate works in 117 | themselves, then this License, and its terms, do not apply to those 118 | sections when you distribute them as separate works. But when you 119 | distribute the same sections as part of a whole which is a work based 120 | on the Program, the distribution of the whole must be on the terms of 121 | this License, whose permissions for other licensees extend to the 122 | entire whole, and thus to each and every part regardless of who wrote it. 123 | 124 | Thus, it is not the intent of this section to claim rights or contest 125 | your rights to work written entirely by you; rather, the intent is to 126 | exercise the right to control the distribution of derivative or 127 | collective works based on the Program. 128 | 129 | In addition, mere aggregation of another work not based on the Program 130 | with the Program (or with a work based on the Program) on a volume of 131 | a storage or distribution medium does not bring the other work under 132 | the scope of this License. 133 | 134 | 3. You may copy and distribute the Program (or a work based on it, 135 | under Section 2) in object code or executable form under the terms of 136 | Sections 1 and 2 above provided that you also do one of the following: 137 | 138 | a) Accompany it with the complete corresponding machine-readable 139 | source code, which must be distributed under the terms of Sections 140 | 1 and 2 above on a medium customarily used for software interchange; or, 141 | 142 | b) Accompany it with a written offer, valid for at least three 143 | years, to give any third party, for a charge no more than your 144 | cost of physically performing source distribution, a complete 145 | machine-readable copy of the corresponding source code, to be 146 | distributed under the terms of Sections 1 and 2 above on a medium 147 | customarily used for software interchange; or, 148 | 149 | c) Accompany it with the information you received as to the offer 150 | to distribute corresponding source code. (This alternative is 151 | allowed only for noncommercial distribution and only if you 152 | received the program in object code or executable form with such 153 | an offer, in accord with Subsection b above.) 154 | 155 | The source code for a work means the preferred form of the work for 156 | making modifications to it. For an executable work, complete source 157 | code means all the source code for all modules it contains, plus any 158 | associated interface definition files, plus the scripts used to 159 | control compilation and installation of the executable. However, as a 160 | special exception, the source code distributed need not include 161 | anything that is normally distributed (in either source or binary 162 | form) with the major components (compiler, kernel, and so on) of the 163 | operating system on which the executable runs, unless that component 164 | itself accompanies the executable. 165 | 166 | If distribution of executable or object code is made by offering 167 | access to copy from a designated place, then offering equivalent 168 | access to copy the source code from the same place counts as 169 | distribution of the source code, even though third parties are not 170 | compelled to copy the source along with the object code. 171 | 172 | 4. You may not copy, modify, sublicense, or distribute the Program 173 | except as expressly provided under this License. Any attempt 174 | otherwise to copy, modify, sublicense or distribute the Program is 175 | void, and will automatically terminate your rights under this License. 176 | However, parties who have received copies, or rights, from you under 177 | this License will not have their licenses terminated so long as such 178 | parties remain in full compliance. 179 | 180 | 5. You are not required to accept this License, since you have not 181 | signed it. However, nothing else grants you permission to modify or 182 | distribute the Program or its derivative works. These actions are 183 | prohibited by law if you do not accept this License. Therefore, by 184 | modifying or distributing the Program (or any work based on the 185 | Program), you indicate your acceptance of this License to do so, and 186 | all its terms and conditions for copying, distributing or modifying 187 | the Program or works based on it. 188 | 189 | 6. Each time you redistribute the Program (or any work based on the 190 | Program), the recipient automatically receives a license from the 191 | original licensor to copy, distribute or modify the Program subject to 192 | these terms and conditions. You may not impose any further 193 | restrictions on the recipients' exercise of the rights granted herein. 194 | You are not responsible for enforcing compliance by third parties to 195 | this License. 196 | 197 | 7. If, as a consequence of a court judgment or allegation of patent 198 | infringement or for any other reason (not limited to patent issues), 199 | conditions are imposed on you (whether by court order, agreement or 200 | otherwise) that contradict the conditions of this License, they do not 201 | excuse you from the conditions of this License. If you cannot 202 | distribute so as to satisfy simultaneously your obligations under this 203 | License and any other pertinent obligations, then as a consequence you 204 | may not distribute the Program at all. For example, if a patent 205 | license would not permit royalty-free redistribution of the Program by 206 | all those who receive copies directly or indirectly through you, then 207 | the only way you could satisfy both it and this License would be to 208 | refrain entirely from distribution of the Program. 209 | 210 | If any portion of this section is held invalid or unenforceable under 211 | any particular circumstance, the balance of the section is intended to 212 | apply and the section as a whole is intended to apply in other 213 | circumstances. 214 | 215 | It is not the purpose of this section to induce you to infringe any 216 | patents or other property right claims or to contest validity of any 217 | such claims; this section has the sole purpose of protecting the 218 | integrity of the free software distribution system, which is 219 | implemented by public license practices. Many people have made 220 | generous contributions to the wide range of software distributed 221 | through that system in reliance on consistent application of that 222 | system; it is up to the author/donor to decide if he or she is willing 223 | to distribute software through any other system and a licensee cannot 224 | impose that choice. 225 | 226 | This section is intended to make thoroughly clear what is believed to 227 | be a consequence of the rest of this License. 228 | 229 | 8. If the distribution and/or use of the Program is restricted in 230 | certain countries either by patents or by copyrighted interfaces, the 231 | original copyright holder who places the Program under this License 232 | may add an explicit geographical distribution limitation excluding 233 | those countries, so that distribution is permitted only in or among 234 | countries not thus excluded. In such case, this License incorporates 235 | the limitation as if written in the body of this License. 236 | 237 | 9. The Free Software Foundation may publish revised and/or new versions 238 | of the General Public License from time to time. Such new versions will 239 | be similar in spirit to the present version, but may differ in detail to 240 | address new problems or concerns. 241 | 242 | Each version is given a distinguishing version number. If the Program 243 | specifies a version number of this License which applies to it and "any 244 | later version", you have the option of following the terms and conditions 245 | either of that version or of any later version published by the Free 246 | Software Foundation. If the Program does not specify a version number of 247 | this License, you may choose any version ever published by the Free Software 248 | Foundation. 249 | 250 | 10. If you wish to incorporate parts of the Program into other free 251 | programs whose distribution conditions are different, write to the author 252 | to ask for permission. For software which is copyrighted by the Free 253 | Software Foundation, write to the Free Software Foundation; we sometimes 254 | make exceptions for this. Our decision will be guided by the two goals 255 | of preserving the free status of all derivatives of our free software and 256 | of promoting the sharing and reuse of software generally. 257 | 258 | NO WARRANTY 259 | 260 | 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY 261 | FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN 262 | OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES 263 | PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED 264 | OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 265 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS 266 | TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE 267 | PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, 268 | REPAIR OR CORRECTION. 269 | 270 | 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 271 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR 272 | REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, 273 | INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING 274 | OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED 275 | TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY 276 | YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER 277 | PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE 278 | POSSIBILITY OF SUCH DAMAGES. 279 | 280 | END OF TERMS AND CONDITIONS 281 | 282 | How to Apply These Terms to Your New Programs 283 | 284 | If you develop a new program, and you want it to be of the greatest 285 | possible use to the public, the best way to achieve this is to make it 286 | free software which everyone can redistribute and change under these terms. 287 | 288 | To do so, attach the following notices to the program. It is safest 289 | to attach them to the start of each source file to most effectively 290 | convey the exclusion of warranty; and each file should have at least 291 | the "copyright" line and a pointer to where the full notice is found. 292 | 293 | 294 | Copyright (C) 295 | 296 | This program is free software; you can redistribute it and/or modify 297 | it under the terms of the GNU General Public License as published by 298 | the Free Software Foundation; either version 2 of the License, or 299 | (at your option) any later version. 300 | 301 | This program is distributed in the hope that it will be useful, 302 | but WITHOUT ANY WARRANTY; without even the implied warranty of 303 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 304 | GNU General Public License for more details. 305 | 306 | You should have received a copy of the GNU General Public License along 307 | with this program; if not, write to the Free Software Foundation, Inc., 308 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 309 | 310 | Also add information on how to contact you by electronic and paper mail. 311 | 312 | If the program is interactive, make it output a short notice like this 313 | when it starts in an interactive mode: 314 | 315 | Gnomovision version 69, Copyright (C) year name of author 316 | Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 317 | This is free software, and you are welcome to redistribute it 318 | under certain conditions; type `show c' for details. 319 | 320 | The hypothetical commands `show w' and `show c' should show the appropriate 321 | parts of the General Public License. Of course, the commands you use may 322 | be called something other than `show w' and `show c'; they could even be 323 | mouse-clicks or menu items--whatever suits your program. 324 | 325 | You should also get your employer (if you work as a programmer) or your 326 | school, if any, to sign a "copyright disclaimer" for the program, if 327 | necessary. Here is a sample; alter the names: 328 | 329 | Yoyodyne, Inc., hereby disclaims all copyright interest in the program 330 | `Gnomovision' (which makes passes at compilers) written by James Hacker. 331 | 332 | , 1 April 1989 333 | Ty Coon, President of Vice 334 | 335 | This General Public License does not permit incorporating your program into 336 | proprietary programs. If your program is a subroutine library, you may 337 | consider it more useful to permit linking proprietary applications with the 338 | library. If this is what you want to do, use the GNU Lesser General 339 | Public License instead of this License. 340 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | What is J-STAR ? 2 | 3 | A Desktop version PI-STAR, with HDMI, Remote Desktop, High efficiency software toolkit for MMDVM Project. In this project (build in Raspbian OS), you can easy to make the following interesting functions work. 4 | `MMDVM Digital mode, FM Mode, FM Netowrk, Alistarlink, DVSwitch, Sip, Analog_reflector, USRP Client, APRS(Direwolf) ,and so on` 5 | 6 | Also I add some very useful tools, such as: visual software manager, Pi-Apps, you can install the application you need, such as AnyDesk, just like you use Windows, MacOS convenient. 7 | 8 | More features continue to be added and improved, such as SDR++, OpenWebRX, Spectrum analysis software. In J-STAR, you can complete your MMDVM repeater, hotspot debugging and daily remote maintenance. 9 | 10 | Why J ? My callsign including the J. 11 | 12 | Subscribe update daily & weekly https://groups.io/g/J-STAR 13 | 14 | Wiki for J-STAR `https://github.com/JTA-STAR/J-STAR/wiki/J%E2%80%90STAR-wiki` 15 | 16 | ``` 17 | Project Statement, Disclaimer: 18 | J-STAR Based on open source MMDVM, PI-STAR, WPSD. 19 | This software is for use on amateur radio networks only, it is to be used for educational purposes only. 20 | Its use on commercial networks is strictly prohibited. 21 | ``` 22 | 23 | ![J-STAR-4B-HDMI0](https://github.com/JTA-STAR/J-STAR/assets/22002824/4f23f81b-37c9-46ff-b720-bf25e5f27183) 24 | 25 | ### Ready to flash. 26 | ![image](https://github.com/JTA-STAR/J-STAR/assets/22002824/4713db4a-17a7-4066-9a8b-fd8598e72c1f) 27 | 28 | ``` 29 | Tool 1: balenaEtcher for macOS ,Windows , Not need format before flash. 30 | Download https://etcher.balena.io/ 31 | 32 | Tool 2: Win32 disk image Writer for Windows (Need format SD Card before flash) 33 | 34 | SDFormatter: https://www.bi7jta.org/files/PiStarTools/SDFormatterv4.zip 35 | Win32 disk image Writer: https://www.bi7jta.org/files/PiStarTools/win32diskimager-1.0.0-install.zip 36 | ``` 37 | 38 | ### After flash and boot. 39 | change the update server and update to the new version. 40 | 41 | ![image](https://github.com/JTA-STAR/J-STAR/assets/22002824/9a1380da-5e98-4306-9b9d-2e20c8d7f02b) 42 | 43 | 44 | ### J-STAR for Raspberry Pi 4B,3B, 3A+, 0W 45 | ```(Ver2.3 build 2024.01.15) 46 | Support: Raspberry Pi 4B,3B, 3A,Zero . (NOT support 5B, 2W) 47 | lsb_release -a 48 | No LSB modules are available. 49 | Distributor ID: Raspbian 50 | Description: Raspbian GNU/Linux 10 (buster) 51 | Release: 10 52 | Codename: buster 53 | https://drive.google.com/drive/folders/1XQA4YaSBryw9EhPxpPbsCDsx2OgiHQJe?usp=sharing 54 | ``` 55 | 56 | ![J-STAR-4B-wallpaper](https://github.com/JTA-STAR/J-STAR/assets/22002824/be8b4bfd-76e4-411f-8753-8e3bf7127395) 57 | 58 | 59 | 60 | ### J-STAR for Raspberry Pi 5B 61 | ```(Ver1.5 build 2024.01.15) 62 | Lite Preview Edition, the purpose is to adapt Raspberry Pi 5B. NOT including Alistarlink, DVSwitch, Sip, Analog_reflector, USRP Client, APRS(Direwolf) 63 | 64 | Support: Raspberry Pi 5B , (NOT support 3B, 2W, ZW, In RPi 4B, the /dev/ttyAMA0 not detect) 65 | 66 | lsb_release -a 67 | No LSB modules are available. 68 | Distributor ID: Raspbian 69 | Description: Raspbian GNU/Linux 12 (bookworm) 70 | Release: 12 71 | Codename: bookworm 72 | https://drive.google.com/drive/folders/1H9MXX3Cz0OwgPQ92ZpFnpFLIVNOA1DzP?usp=sharing 73 | ``` 74 | 75 | ![J-STAR-5B-wallpaper](https://github.com/JTA-STAR/J-STAR/assets/22002824/8df26148-74a2-4450-afc6-64e2886c99e8) 76 | 77 | 78 | ### J-STAR for Raspberry Pi 2W 79 | ```(Ver1.5 build 2024.01.15) 80 | Lite Preview Edition, the purpose is to adapt Raspberry Pi 2W. NOT including Alistarlink, DVSwitch, Sip, Analog_reflector, USRP Client, APRS(Direwolf) 81 | 82 | lsb_release -a 83 | No LSB modules are available. 84 | Distributor ID: Raspbian 85 | Description: Raspbian GNU/Linux 11 (bullseye) 86 | Release: 11 87 | Codename: bullseye 88 | https://drive.google.com/drive/folders/15Wb69Rx3OBDFT8-G9dBuKeLbOB5H4Ctq?usp=sharing 89 | ``` 90 | 91 | 92 | ### J-STAR for BPiM2 Berry (BananaPi) 1G 93 | ```(Ver2.3 build 2024.01.18) 94 | 95 | lsb_release -a 96 | No LSB modules are available. 97 | Distributor ID: Raspbian 98 | Description: Raspbian GNU/Linux 10 (buster) 99 | Release: 10 100 | Codename: buster 101 | 102 | https://drive.google.com/drive/folders/1rdo-ubDx7-jWKAF7aBeiNfyVrr_WfYeD?usp=sharing 103 | ``` 104 | 105 | ### J-STAR for BPiM2Z (BananaPi) 512M 106 | ```(Ver2.3 build 2024.01.18) 107 | 108 | lsb_release -a 109 | No LSB modules are available. 110 | Distributor ID: Raspbian 111 | Description: Raspbian GNU/Linux 10 (buster) 112 | Release: 10 113 | Codename: buster 114 | 115 | https://drive.google.com/drive/folders/1_vt5qpS1pQ66oB9Amj4K3XLwUU7XTZ9u?usp=sharing 116 | ``` 117 | 118 | ### J-STAR for X86_64 VirtualBox (PVE: unzip the ova file , import to PVE) 119 | 120 | ![image](https://github.com/JTA-STAR/J-STAR/assets/22002824/0501b031-e87c-49df-a6f1-05c419c8ad99) 121 | 122 | ``` 123 | lsb_release -a 124 | No LSB modules are available. 125 | Distributor ID: Debian 126 | Description: Debian GNU/Linux 11 (bullseye) 127 | Release: 11 128 | Codename: bullseye 129 | 130 | Requirement: 131 | VirtualBox 6.1+ ,macOS10.13.6+ , Windows 10+,64bit(Not support Win7). 132 | If need VMWare, EXSi use, you need export from VirtualBox yourself. 133 | 134 | https://drive.google.com/drive/folders/14F22TiTK6mFcBT9sHPIiuZ5gVHqhEwnb?usp=sharing 135 | ``` 136 | 137 | ![J-STAR_with_FreeDMR_X86_64_VisualBox](https://github.com/JTA-STAR/J-STAR/assets/22002824/e4038d96-b519-4332-a1db-1332e891560b) 138 | 139 | 140 | ### J-Star_X86_64_v2.3 for ESXi VMWare 141 | The same version as J-STAR for X86_64 VirtualBox 142 | 143 | Known issue : the Desktop lost after import from VisualBox ova format. 144 | 145 | ![J-Star-ESXi](https://github.com/JTA-STAR/J-STAR/assets/22002824/0c4f0955-b5a7-461b-9850-e7d49a57ac8f) 146 | 147 | https://drive.google.com/drive/folders/1BnHPFANjHg4MRVng_pohUFwegnvgzWRO?usp=drive_link 148 | 149 | ### Join and discuss 150 | ``` 151 | https://www.facebook.com/groups/v3f446 (Facebook) 152 | https://t.me/+HTzVv--5ZLs1YWU1 (Telegram) 153 | https://discord.gg/JySeg9BgaN (Discord) 154 | ``` 155 | 156 | ### Commit the issue you meet. 157 | ``` 158 | Issue: https://github.com/JTA-STAR/J-STAR/issues?q= 159 | 160 | I will fix and notifiy you the update in J-STAR Dashboard 161 | 162 | Subscribe to email : https://groups.io/g/J-STAR 163 | Subscribe to iOS :https://apps.apple.com/us/app/groups-io-app/id1553820507 164 | Subscribe to Android https://play.google.com/store/apps/details?id=io.groups.webapp 165 | ``` 166 | [Donate J-STAR for more support](https://paypal.me/yanglixia?country.x=C2&locale.x=en_US) 167 | 168 | VY 73 DE BI7JTA 169 | 170 | -------------------------------------------------------------------------------- /add-submodule.sh: -------------------------------------------------------------------------------- 1 | git submodule add https://github.com/bi7jta/W0CHP-PiStar-Dash_BPiM2.git J-STAR_Dash 2 | 3 | git submodule add https://github.com/bi7jta/W0CHP-PiStar-sbin_BPiM2.git J-STAR_sbin 4 | 5 | git submodule add https://github.com/bi7jta/BI7JTA-PiStar-bin_RPi4B.git J-STAR_bin_RPi4B 6 | 7 | git submodule add https://github.com/bi7jta/W0CHP-PiStar-bin_BPiM2.git J-STAR_bin_BPiM2 8 | 9 | git submodule add https://github.com/bi7jta/W0CHP-CustomBinaries-Source_BPiM2.git J-STAR_CustomBinaries-Source 10 | 11 | git submodule add https://github.com/bi7jta/Lin-Star-ALL-VisualBox.git J-STAR_X86-64 -------------------------------------------------------------------------------- /extra-updateScripts/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JTA-STAR/J-STAR/8756d0fc6fc3163019b28166e0f3f69a4eb2afda/extra-updateScripts/.DS_Store -------------------------------------------------------------------------------- /extra-updateScripts/7寸盒Wi-Fi驱动补丁安装教程(更新).docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JTA-STAR/J-STAR/8756d0fc6fc3163019b28166e0f3f69a4eb2afda/extra-updateScripts/7寸盒Wi-Fi驱动补丁安装教程(更新).docx -------------------------------------------------------------------------------- /extra-updateScripts/Change-Github-to-Gitee-And-Hard-update-dashboard.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # sudo curl https://www.bi7jta.cn/files/AndyTaylorTweet/updateScripts/Change-Github-to-Gitee-And-Hard-update-dashboard.sh | sudo sh 3 | 4 | git_update() { 5 | # Set the function variables 6 | gitFolder=${1} 7 | git --work-tree=${gitFolder} --git-dir=${gitFolder}/.git reset --hard && git --work-tree=${gitFolder} --git-dir=${gitFolder}/.git clean -f #使本地完全回退到上次 commit 8 | # Git-忽略冲突,强制更新代码并覆盖本地代码 9 | git --work-tree=${gitFolder} --git-dir=${gitFolder}/.git fetch --all 10 | # Reset local modified, 11 | git --work-tree=${gitFolder} --git-dir=${gitFolder}/.git reset --hard origin/master 12 | # Pull new updated, 13 | git --work-tree=${gitFolder} --git-dir=${gitFolder}/.git pull -q origin master 14 | } 15 | 16 | if [ "$(id -u)" != "0" ]; then 17 | echo -e "You need to be root to run this command...\n" 18 | exit 1 19 | fi 20 | 21 | echo "=============================================================" 22 | echo "" 23 | echo "20231227更新:增加Windows10, macOS虚拟机的更新支持" 24 | echo "" 25 | echo "=============================================================" 26 | 27 | # 判断如果是Version = 3.4.17,不是以 Version = 4 (Version = 4.1.4) 开头,则不允许升级,提示先刷系统到4.1.4+ 28 | FIND_FILE="/etc/pistar-release" 29 | FIND_STR="Version = 4" 30 | FIND_WPSD="WPSD_Ver" 31 | 32 | #这里判断不准确了! 33 | if [ `grep -c "$FIND_STR" $FIND_FILE` -ne '0' ];then 34 | echo "Pi-Star V4+, update it" 35 | cat ${FIND_FILE} 36 | else 37 | if [ `grep -c "$WPSD_Ver" $FIND_FILE` -ne '1' ];then 38 | echo "Pi-Star WPSD_Ver, replace it" 39 | cat ${FIND_FILE} 40 | else 41 | echo "监测到你正在使用的是Pi-Star低于V4版本,不支持直接升级,请先用SD卡刷V4.1.4以上的系统" 42 | echo "树莓派:http://www.pistar.uk/downloads/" 43 | echo "NanoPi/OrangePi:http://www.pistar.uk/beta/" 44 | cat ${FIND_FILE} 45 | exit 1 46 | fi 47 | fi 48 | 49 | #用这种判断 50 | STR_V3="Pi-Star_Binaries.git" 51 | STR_BIN_DIR="/usr/local/bin/.git/config" 52 | if [ `grep -c "$STR_V3" $STR_BIN_DIR` -ne '0' ];then 53 | echo "监测到你正在使用的bin是Pi-Star为V3版本,不支持直接升级,请先用SD卡刷V4.1.4以上的系统" 54 | echo "树莓派:http://www.pistar.uk/downloads/" 55 | echo "NanoPi/OrangePi:http://www.pistar.uk/beta/" 56 | cat ${STR_BIN_DIR} 57 | exit 1 58 | fi 59 | 60 | cd /home/pi-star; 61 | 62 | sudo mount -o remount,rw / 63 | echo "国内Pi更新源经常无效,放弃!" 64 | echo "使用官网的,反而能用到清华大学的源:http://mirrors.ustc.edu.cn/raspbian/raspbian buster/main" 65 | #sudo sed -i "s#raspbian.raspberrypi.org#mirrors.tuna.tsinghua.edu.cn#g" /etc/apt/sources.list 66 | 67 | echo 'apt-get源:' 68 | cat /etc/apt/sources.list 69 | 70 | #sudo sed -i "s#archive.raspberrypi.org#mirrors.tuna.tsinghua.edu.cn#g" /etc/apt/sources.list.d/raspi.list 71 | echo 'raspi.list源:' 72 | cat /etc/apt/sources.list.d/raspi.list 73 | 74 | echo '更新更新服务器地址为国内, 务必增加sudo'; 75 | # TODO 需要处理异常 76 | 77 | # BIN二进制程序 78 | # 首先处理最原始的库为github的,只针对树莓派4桌面版,其它的不处理,处理完后,与W0CHP库没有关系了 79 | sudo sed -i "s#https://wpsd-swd.w0chp.net/WPSD-SWD/W0CHP-PiStar-bin.git#https://github.com/bi7jta/BI7JTA-PiStar-bin_RPi4B.git#g" /usr/local/bin/.git/config #新版WPSD2023 80 | sudo sed -i "s#https://repo.w0chp.net/WPSD-Dev/W0CHP-PiStar-bin.git#https://github.com/bi7jta/BI7JTA-PiStar-bin_RPi4B.git#g" /usr/local/bin/.git/config # 这里处理WPSD版本的bin项目 81 | sudo sed -i "s#https://github.com/AndyTaylorTweet/Pi-Star_v4_Binaries_Bin.git#https://github.com/bi7jta/BI7JTA-PiStar-bin_RPi4B.git#g" /usr/local/bin/.git/config # 这里处理MW0MWZ版本V4的bin项目 82 | sudo sed -i "s#https://gitee.com/BI7JTA/Pi-Star_v4_Binaries_Bin.git#https://github.com/bi7jta/BI7JTA-PiStar-bin_RPi4B.git#g" /usr/local/bin/.git/config # 这里V4执行了老脚本的情况 83 | #sudo sed -i "s#https://github.com/AndyTaylorTweet/Pi-Star_Binaries.git#https://github.com/bi7jta/BI7JTA-PiStar-bin_RPi4B.git#g" /usr/local/bin/.git/config #3.4.17版本不支持更新 84 | sudo sed -i "s#https://github.com/bi7jta/BI7JTA-PiStar-bin_RPi4B.git#https://gitee.com/BI7JTA/BI7JTA-PiStar-bin_RPi4B.git#g" /usr/local/bin/.git/config # 改github为gitee, debian 10/11 85 | 86 | # 这里是处理BPiM2的 # BPi-M2专用,不通用,内核版本低debian9 87 | sudo sed -i "s#https://github.com/bi7jta/W0CHP-PiStar-bin_BPiM2.git#https://gitee.com/BI7JTA/W0CHP-PiStar-bin_BPiM2.git#g" /usr/local/bin/.git/config 88 | 89 | # 处理Windows VisualBox 90 | sudo sed -i "s#https://github.com/GhostBassist/Lin-Star-Bin#https://github.com/bi7jta/Lin-Star-Bin_VisualBox.git#g" /usr/local/bin/.git/config # 这里处理处理Windows VisualBox 91 | sudo sed -i "s#https://github.com/bi7jta/Lin-Star-Bin_VisualBox.git#https://gitee.com/BI7JTA/Lin-Star-Bin_VisualBox.git#g" /usr/local/bin/.git/config # 改github为gitee, Windows VisualBox 92 | 93 | echo 'bin源:'; 94 | cat /usr/local/bin/.git/config; 95 | 96 | echo "Updating /usr/local/bin ..." 97 | git_update /usr/local/bin 98 | echo "Done!\n" 99 | 100 | # SBIN 通用脚本,所有Linux系统可共用 101 | sudo sed -i "s#https://wpsd-swd.w0chp.net/WPSD-SWD/W0CHP-PiStar-sbin.git#https://github.com/bi7jta/W0CHP-PiStar-sbin_BPiM2.git#g" /usr/local/sbin/.git/config #新版WPSD2023 102 | sudo sed -i "s#https://repo.w0chp.net/WPSD-Dev/W0CHP-PiStar-sbin.git#https://github.com/bi7jta/W0CHP-PiStar-sbin_BPiM2.git#g" /usr/local/sbin/.git/config #旧版WPSD 103 | sudo sed -i "s#https://github.com/GhostBassist/Lin-Star-sBin#https://github.com/bi7jta/W0CHP-PiStar-sbin_BPiM2.git#g" /usr/local/sbin/.git/config #X64 虚拟机 104 | sudo sed -i "s#https://github.com/AndyTaylorTweet/Pi-Star_Binaries_sbin.git#https://github.com/bi7jta/W0CHP-PiStar-sbin_BPiM2.git#g" /usr/local/sbin/.git/config #MW0MWZ版 105 | sudo sed -i "s#https://gitee.com/BI7JTA/Pi-Star_Binaries_sbin.git#https://github.com/bi7jta/W0CHP-PiStar-sbin_BPiM2.git#g" /usr/local/sbin/.git/config # 这里V4执行了老脚本的情况 106 | sudo sed -i "s#https://github.com/bi7jta/W0CHP-PiStar-sbin_BPiM2.git#https://gitee.com/BI7JTA/W0CHP-PiStar-sbin_BPiM2.git#g" /usr/local/sbin/.git/config #统一改为gitee 107 | echo 'sbin源:' 108 | cat /usr/local/sbin/.git/config; 109 | 110 | echo "Updating /usr/local/sbin ..." 111 | git_update /usr/local/sbin 112 | echo "Done!\n" 113 | 114 | sudo sed -i "s#https://wpsd-swd.w0chp.net/WPSD-SWD/W0CHP-PiStar-Dash.git#https://github.com/bi7jta/W0CHP-PiStar-Dash_BPiM2.git#g" /var/www/dashboard/.git/config #新版WPSD2023 115 | sudo sed -i "s#https://repo.w0chp.net/WPSD-Dev/W0CHP-PiStar-Dash.git#https://github.com/bi7jta/W0CHP-PiStar-Dash_BPiM2.git#g" /var/www/dashboard/.git/config #旧版W0CHP 116 | sudo sed -i "s#https://repo.w0chp.net/Chipster/W0CHP-PiStar-Dash.git#https://github.com/bi7jta/W0CHP-PiStar-Dash_BPiM2.git#g" /var/www/dashboard/.git/config #X64 虚拟机 117 | sudo sed -i "s#https://github.com/AndyTaylorTweet/Pi-Star_DV_Dash.git#https://github.com/bi7jta/W0CHP-PiStar-Dash_BPiM2.git#g" /var/www/dashboard/.git/config #MW0MWZ版 118 | sudo sed -i "s#https://gitee.com/BI7JTA/Pi-Star_DV_Dash.git#https://github.com/bi7jta/W0CHP-PiStar-Dash_BPiM2.git#g" /var/www/dashboard/.git/config # 这里V4执行了老脚本的情况 119 | sudo sed -i "s#https://github.com/bi7jta/W0CHP-PiStar-Dash_BPiM2.git#https://gitee.com/BI7JTA/W0CHP-PiStar-Dash_BPiM2.git#g" /var/www/dashboard/.git/config 120 | echo 'dashboard源:' 121 | cat /var/www/dashboard/.git/config; 122 | 123 | 124 | echo "Updating /var/www/dashboard ..." 125 | git_update /var/www/dashboard 126 | echo "Done!\n" 127 | 128 | 129 | echo "All Done"; 130 | -------------------------------------------------------------------------------- /extra-updateScripts/Change-MW0MWZ-Bin-Support-V3F4-And-Hard-update-bin.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # sudo curl https://www.bi7jta.cn/files/AndyTaylorTweet/updateScripts/Change-MW0MWZ-Bin-Support-V3F4-And-Hard-update-bin.sh | sudo sh 3 | 4 | git_update() { 5 | # Set the function variables 6 | gitFolder=${1} 7 | git --work-tree=${gitFolder} --git-dir=${gitFolder}/.git reset --hard && git --work-tree=${gitFolder} --git-dir=${gitFolder}/.git clean -f #使本地完全回退到上次 commit 8 | # Git-忽略冲突,强制更新代码并覆盖本地代码 9 | git --work-tree=${gitFolder} --git-dir=${gitFolder}/.git fetch --all 10 | # Reset local modified, 11 | git --work-tree=${gitFolder} --git-dir=${gitFolder}/.git reset --hard origin/master 12 | # Pull new updated, 13 | git --work-tree=${gitFolder} --git-dir=${gitFolder}/.git pull -q origin master 14 | } 15 | 16 | if [ "$(id -u)" != "0" ]; then 17 | echo -e "You need to be root to run this command...\n" 18 | exit 1 19 | fi 20 | 21 | sudo mount -o remount,rw / 22 | 23 | sudo systemctl stop pistar-watchdog.timer 24 | sudo systemctl stop pistar-watchdog.service 25 | sudo systemctl stop mmdvmhost.timer 26 | sudo systemctl stop mmdvmhost.service 27 | 28 | # BIN二进制程序 29 | sudo sed -i "s#https://github.com/AndyTaylorTweet/Pi-Star_v4_Binaries_Bin.git#https://gitee.com/BI7JTA/Pi-Star_v4_Binaries_Bin.git#g" /usr/local/bin/.git/config # 这里处理MW0MWZ版本V4的bin项目 30 | 31 | echo 'bin源:'; 32 | cat /usr/local/bin/.git/config; 33 | 34 | echo "Updating /usr/local/bin ..." 35 | git_update /usr/local/bin 36 | echo "Done!\n" 37 | 38 | sudo systemctl start pistar-watchdog.timer 39 | sudo systemctl start pistar-watchdog.service 40 | sudo systemctl start mmdvmhost.timer 41 | sudo systemctl start mmdvmhost.service 42 | 43 | echo "All Done"; 44 | -------------------------------------------------------------------------------- /extra-updateScripts/Change-MW0MWZ-Bin-github-to-gitee-v4.2.0-And-Hard-update-bin.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # to https://gitee.com/BI7JTA/Pi-Star_v4_2_0_Binaries_Bin.git 3 | # sudo curl https://www.bi7jta.cn/files/AndyTaylorTweet/updateScripts/Change-MW0MWZ-Bin-github-to-gitee-v4.2.0-And-Hard-update-bin.sh | sudo sh 4 | 5 | git_update() { 6 | # Set the function variables 7 | gitFolder=${1} 8 | git --work-tree=${gitFolder} --git-dir=${gitFolder}/.git reset --hard && git --work-tree=${gitFolder} --git-dir=${gitFolder}/.git clean -f #使本地完全回退到上次 commit 9 | # Git-忽略冲突,强制更新代码并覆盖本地代码 10 | git --work-tree=${gitFolder} --git-dir=${gitFolder}/.git fetch --all 11 | # Reset local modified, 12 | git --work-tree=${gitFolder} --git-dir=${gitFolder}/.git reset --hard origin/master 13 | # Pull new updated, 14 | git --work-tree=${gitFolder} --git-dir=${gitFolder}/.git pull -q origin master 15 | } 16 | 17 | if [ "$(id -u)" != "0" ]; then 18 | echo -e "You need to be root to run this command...\n" 19 | exit 1 20 | fi 21 | 22 | sudo mount -o remount,rw / 23 | 24 | sudo systemctl stop pistar-watchdog.timer 25 | sudo systemctl stop pistar-watchdog.service 26 | sudo systemctl stop mmdvmhost.timer 27 | sudo systemctl stop mmdvmhost.service 28 | 29 | # BIN二进制程序 30 | sudo sed -i "s#https://github.com/AndyTaylorTweet/Pi-Star_v4_Binaries_Bin.git#https://gitee.com/BI7JTA/Pi-Star_v4_2_0_Binaries_Bin.git#g" /usr/local/bin/.git/config # 这里处理MW0MWZ版本V4的bin项目 31 | 32 | echo 'bin源:'; 33 | cat /usr/local/bin/.git/config; 34 | 35 | echo "Updating /usr/local/bin ..." 36 | git_update /usr/local/bin 37 | echo "Done!\n" 38 | 39 | sudo systemctl start pistar-watchdog.timer 40 | sudo systemctl start pistar-watchdog.service 41 | sudo systemctl start mmdvmhost.timer 42 | sudo systemctl start mmdvmhost.service 43 | 44 | echo "All Done"; 45 | -------------------------------------------------------------------------------- /extra-updateScripts/Change-MW0MWZ-github-to-mirror_gitee-And-Hard-update-bin.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 同步更新到镜像 3 | # sudo curl https://www.bi7jta.cn/files/AndyTaylorTweet/updateScripts/Change-MW0MWZ-github-to-mirror_gitee-And-Hard-update-bin.sh | sudo sh 4 | 5 | git_update() { 6 | # Set the function variables 7 | gitFolder=${1} 8 | git --work-tree=${gitFolder} --git-dir=${gitFolder}/.git reset --hard && git --work-tree=${gitFolder} --git-dir=${gitFolder}/.git clean -f #使本地完全回退到上次 commit 9 | # Git-忽略冲突,强制更新代码并覆盖本地代码 10 | git --work-tree=${gitFolder} --git-dir=${gitFolder}/.git fetch --all 11 | # Reset local modified, 12 | git --work-tree=${gitFolder} --git-dir=${gitFolder}/.git reset --hard origin/master 13 | # Pull new updated, 14 | git --work-tree=${gitFolder} --git-dir=${gitFolder}/.git pull -q origin master 15 | } 16 | 17 | if [ "$(id -u)" != "0" ]; then 18 | echo -e "You need to be root to run this command...\n" 19 | exit 1 20 | fi 21 | 22 | sudo mount -o remount,rw / 23 | 24 | sudo systemctl stop pistar-watchdog.timer 25 | sudo systemctl stop pistar-watchdog.service 26 | sudo systemctl stop mmdvmhost.timer 27 | sudo systemctl stop mmdvmhost.service 28 | sudo systemctl stop nextiondriver.service 29 | 30 | # BIN二进制程序 31 | sudo sed -i "s#https://github.com/AndyTaylorTweet/Pi-Star_v4_Binaries_Bin.git#https://gitee.com/BI7JTA/Pi-Star_v4_Binaries_Bin.git#g" /usr/local/bin/.git/config # 这里处理MW0MWZ版本V4的bin项目 32 | 33 | echo 'bin源:'; 34 | cat /usr/local/bin/.git/config; 35 | 36 | echo "Updating /usr/local/bin ..." 37 | git_update /usr/local/bin 38 | echo "Done!\n" 39 | 40 | # SBIN脚本 41 | sudo sed -i "s#https://github.com/AndyTaylorTweet/Pi-Star_Binaries_sbin.git#https://gitee.com/BI7JTA/Pi-Star_Binaries_sbin.git#g" /usr/local/sbin/.git/config # 这里处理MW0MWZ版本V4的bin项目 42 | 43 | echo 'sbin源:'; 44 | cat /usr/local/sbin/.git/config; 45 | 46 | echo "Updating /usr/local/sbin ..." 47 | git_update /usr/local/sbin 48 | echo "Done!\n" 49 | 50 | # 网页脚本 51 | sudo sed -i "s#https://github.com/AndyTaylorTweet/Pi-Star_DV_Dash.git#https://gitee.com/BI7JTA/Pi-Star_DV_Dash.git#g" /var/www/dashboard/.git/config # 这里处理MW0MWZ版本V4的bin项目 52 | 53 | echo 'Dashboard源:'; 54 | cat /var/www/dashboard/.git/config; 55 | 56 | echo "Updating /var/www/dashboard ..." 57 | git_update /var/www/dashboard 58 | echo "Done!\n" 59 | 60 | sudo systemctl start pistar-watchdog.timer 61 | sudo systemctl start pistar-watchdog.service 62 | sudo systemctl start nextiondriver.service 63 | sudo systemctl start mmdvmhost.timer 64 | sudo systemctl start mmdvmhost.service 65 | 66 | echo "All Done"; 67 | -------------------------------------------------------------------------------- /extra-updateScripts/Install_NextionDriver.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | ## sudo curl https://www.bi7jta.cn/files/AndyTaylorTweet/updateScripts/Install_NextionDriver.sh | sudo sh 4 | 5 | main_function() { 6 | 7 | service_file="/lib/systemd/system/nextiondriver.service" 8 | 9 | # 检查文件是否存在 10 | if [ -f "$service_file" ]; then 11 | echo "错误: 监测到已安装NextionDriver驱动, 请先执行先卸载." 12 | exit 1 13 | fi 14 | 15 | sudo mount -o remount,rw / 16 | sudo systemctl stop nextiondriver; 17 | sudo systemctl disable nextiondriver; 18 | sudo systemctl unmask nextiondriver; 19 | sudo rm /usr/local/bin/NextionDriver; 20 | sudo rm /etc/mmdvmhost.old; 21 | 22 | file_path="/etc/mmdvmhost" 23 | 24 | sudo sed -i "s#\[NextionDriver\]#\[DelNextionDriver\]#g" "$file_path" 25 | # 替换 Display 行 26 | sed -i 's/^Display=.*/Display=Nextion/' "$file_path" 27 | 28 | # 替换 [Nextion] 部分的 Port 行 29 | sed -i '/\[Nextion\]/,/^$/s/^Port=None/Port=modem/' "$file_path" 30 | 31 | cat "$file_path" 32 | 33 | cd /home/pi-star; 34 | curl -Ls https://www.bi7jta.cn/files/MMDVM_Nextion/Driver/oneKey_install_NextionDriver_CN.sh | sudo bash 35 | echo "完成!" 36 | } 37 | 38 | if [ -t 1 ]; then 39 | # run via terminal, only output to screen 40 | main_function 41 | else 42 | # if not run via terminal, log everything into a log file 43 | main_function >> /var/log/pi-star/InstallNextionDriver.log 2>&1 44 | fi 45 | 46 | -------------------------------------------------------------------------------- /extra-updateScripts/J-STAR-OS-Patch_Fix_v2.3_rustdesk_same-ID-issue.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Add to J-STAR-OS-Patch_Fix_v2.3_rustdesk_same-ID-issue 3 | # sudo curl https://www.bi7jta.cn/files/AndyTaylorTweet/updateScripts/J-STAR-OS-Patch_Fix_v2.3_rustdesk_same-ID-issue.sh | sudo sh 4 | 5 | # /root/.config/rustdesk/RustDesk.toml 6 | # 00L9BsUysRGj3y2N7W/5SFgx4s/AFQr/rxAQ== #RPi4B 解码后是原始字符串 492331739 7 | # 00KHz/FNu4rghAOgAOYtxmgNTAlj2sxrEQEQ== #RPi5B Bookworm 8 | # 00LySziUa1ulpT+59cxMr4rQ1nRCj5ycXGFQ== #2W 9 | # 00eTOZDvXNIjLVzQk+GD3O9sRWjMviUDX+ #BPiM2 10 | # 00TdXPIQnmd4uCwl5WZqDy7sBSis/iVzL8RA== #M2z 11 | # 00lbfdli4cmIdM8ZGezUW3ewAjeVqe5zH/rQ== #X86_64 12 | 13 | config_file="/root/.config/rustdesk/RustDesk.toml" 14 | id_strings="00lbfdli4cmIdM8ZGezUW3ewAjeVqe5zH/rQ== 00L9BsUysRGj3y2N7W/5SFgx4s/AFQr/rxAQ== 00KHz/FNu4rghAOgAOYtxmgNTAlj2sxrEQEQ== 00LySziUa1ulpT+59cxMr4rQ1nRCj5ycXGFQ== 00eTOZDvXNIjLVzQk+GD3O9sRWjMviUDX+ 00TdXPIQnmd4uCwl5WZqDy7sBSis/iVzL8RA==" 15 | if [ -f "$config_file" ]; then 16 | # 文件存在 17 | contains_string=false 18 | for id_string in $id_strings; do 19 | if grep -qF "$id_string" "$config_file"; then 20 | contains_string=true 21 | break 22 | fi 23 | done 24 | 25 | if $contains_string; then 26 | # 文件包含指定字符串 27 | cat "$config_file" 28 | echo "Detect the RustDesk default ID, delete and let the OS generate new ID." 29 | 30 | # Remount root as writable 31 | sudo mount -o remount,rw / 32 | 33 | # I guess you will NOT success use the default ID, so I not restart ruster service 34 | #systemctl stop rustdesk.service 35 | 36 | rm -f /root/.config/rustdesk/* 37 | rm -f /home/repeater/.config/rustdesk/* 38 | rm -f /home/pi-star/.config/rustdesk/* 39 | rm -f /home/pi/.config/rustdesk/* 40 | #rm -f /etc/machine-id 41 | 42 | #systemctl start rustdesk.service 43 | else 44 | # 文件不包含指定字符串 45 | cat "$config_file" 46 | echo "Not detect the RustDesk use default ID, skip it." 47 | fi 48 | else 49 | # 文件不存在 50 | echo "RustDesk config file $config_file not exist, skip it." 51 | fi 52 | 53 | # 显示文件内容 54 | echo "All done, you you can re-open your RustDesk in J-STAR Desktop" 55 | 56 | 57 | -------------------------------------------------------------------------------- /extra-updateScripts/NanoPi-NEO-USB-Wi-Fi驱动补丁安装教程.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JTA-STAR/J-STAR/8756d0fc6fc3163019b28166e0f3f69a4eb2afda/extra-updateScripts/NanoPi-NEO-USB-Wi-Fi驱动补丁安装教程.docx -------------------------------------------------------------------------------- /extra-updateScripts/Patch_Add_BM4601_47.100.76.205_To_ServerList.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Add to Pi-Star FreeDMR Local server list 3 | # sudo curl https://www.bi7jta.cn/files/AndyTaylorTweet/updateScripts/Patch_Add_BM4601_47.100.76.205_To_ServerList.sh | sudo sh 4 | 5 | # Remount root as writable 6 | sudo mount -o remount,rw / 7 | 8 | #!/bin/bash 9 | 10 | BM_China_LocalStr="BM_4601_China_47.100.76.205 4601 47.100.76.205 passw0rd 62031" 11 | 12 | # 处理 /root/DMR_Hosts.txt 文件 13 | dmr_hosts_file="/root/DMR_Hosts.txt" 14 | 15 | # 如果文件不存在,则创建 16 | if [ ! -e "$dmr_hosts_file" ]; then 17 | touch "$dmr_hosts_file" 18 | fi 19 | 20 | # 删除包含 BM_4601_China_47.100.76.205 字符串的行,并在末尾插入新行 21 | sed -i '/^BM_4601_China_47.100.76.205/d' "$dmr_hosts_file" 22 | echo "$BM_China_LocalStr" >> "$dmr_hosts_file" 23 | 24 | # 显示文件内容 25 | echo "文件 $dmr_hosts_file 的内容:" 26 | cat "$dmr_hosts_file" 27 | 28 | # 处理 /usr/local/etc/DMR_Hosts.txt 文件 29 | dmr_hosts_file_custom="/usr/local/etc/DMR_Hosts.txt" 30 | 31 | # 删除包含 BM_4601_China_47.100.76.205 字符串的行,并在包含 BM_4601_China\t 字符串的行后插入新行,(注意:\t是TAB制表 符号) 32 | sed -i '/^BM_4601_China_47.100.76.205/d' "$dmr_hosts_file_custom" 33 | sed -i '/^BM_4601_China\t/a '"$BM_China_LocalStr" "$dmr_hosts_file_custom" 34 | 35 | # 显示文件内容 36 | echo "文件 $dmr_hosts_file_custom 的内容:" 37 | grep -i "BM_4601_China" "$dmr_hosts_file_custom" 38 | 39 | 40 | -------------------------------------------------------------------------------- /extra-updateScripts/Patch_Add_FreeDMR_China_Local_127.0.0.1_To_ServerList.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Add to Pi-Star FreeDMR Local server list 3 | # sudo curl https://www.bi7jta.cn/files/AndyTaylorTweet/updateScripts/Patch_Add_FreeDMR_China_Local_127.0.0.1_To_ServerList.sh | sudo sh 4 | 5 | # Remount root as writable 6 | sudo mount -o remount,rw / 7 | 8 | #!/bin/bash 9 | 10 | FreeDMR_China_LocalStr="FreeDMR_China_127.0.0.1 9998 127.0.0.1 passw0rd 55555" 11 | 12 | # 处理 /root/DMR_Hosts.txt 文件 13 | dmr_hosts_file="/root/DMR_Hosts.txt" 14 | 15 | # 如果文件不存在,则创建 16 | if [ ! -e "$dmr_hosts_file" ]; then 17 | touch "$dmr_hosts_file" 18 | fi 19 | 20 | # 删除包含 FreeDMR_China_Local 字符串的行,并在末尾插入新行 21 | sed -i '/^FreeDMR_China_Local_127.0.0.1/d' "$dmr_hosts_file" 22 | echo "$FreeDMR_China_LocalStr" >> "$dmr_hosts_file" 23 | 24 | # 显示文件内容 25 | echo "文件 $dmr_hosts_file 的内容:" 26 | cat "$dmr_hosts_file" 27 | 28 | # 处理 /usr/local/etc/DMR_Hosts.txt 文件 29 | dmr_hosts_file_custom="/usr/local/etc/DMR_Hosts.txt" 30 | 31 | # 删除包含 FreeDMR_China_Local 字符串的行,并在包含 FreeDMR_China\t 字符串的行后插入新行,(注意:\t是TAB制表 符号) 32 | sed -i '/^FreeDMR_China_Local_127.0.0.1/d' "$dmr_hosts_file_custom" 33 | sed -i '/^FreeDMR_China\t/a '"$FreeDMR_China_LocalStr" "$dmr_hosts_file_custom" 34 | 35 | # 显示文件内容 36 | echo "文件 $dmr_hosts_file_custom 的内容:" 37 | cat "$dmr_hosts_file_custom" 38 | 39 | 40 | echo "====================/etc/dmrgateway freeDMR Config sample =================" 41 | echo "[DMR Network 2]" 42 | echo "Enabled=1" 43 | echo "Address=127.0.0.1" 44 | echo "Port=62031" 45 | echo "TGRewrite0=2,9,2,9,1" 46 | echo "PCRewrite0=2,94000,2,4000,1001" 47 | echo "TypeRewrite0=2,9990,2,9990" 48 | echo "SrcRewrite0=2,4000,2,9,1001" 49 | echo "PassAllPC0=1" 50 | echo "PassAllTG0=1" 51 | echo "PassAllPC1=2" 52 | echo "PassAllTG1=2" 53 | echo 'Password="passw0rd"' 54 | echo "Debug=1" 55 | echo "Id=460072402" 56 | echo "Location=0" 57 | echo "Name=FreeDMR_China_Local_127.0.0.1" 58 | echo '#Simplex Mode,Static TG' 59 | echo 'Options="TS2=460755;TIMER=15"' 60 | echo '#Duplex mode' 61 | echo 'Options="TS1=46001;TS2=460755;DIAL=0;TIMER=10;"' 62 | -------------------------------------------------------------------------------- /extra-updateScripts/Patch_Add_FreeDMR_China_Local_192.168.2.33_To_ServerList.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Add to Pi-Star FreeDMR Local server list 3 | # sudo curl https://www.bi7jta.cn/files/AndyTaylorTweet/updateScripts/Patch_Add_FreeDMR_China_Local_192.168.2.33_To_ServerList.sh | sudo sh 4 | 5 | # Remount root as writable 6 | sudo mount -o remount,rw / 7 | 8 | #!/bin/bash 9 | 10 | FreeDMR_China_LocalStr="FreeDMR_China_Local_192.168.2.33 9999 192.168.2.33 passw0rd 55555" 11 | 12 | # 处理 /root/DMR_Hosts.txt 文件 13 | dmr_hosts_file="/root/DMR_Hosts.txt" 14 | 15 | # 如果文件不存在,则创建 16 | if [ ! -e "$dmr_hosts_file" ]; then 17 | touch "$dmr_hosts_file" 18 | fi 19 | 20 | # 删除包含 FreeDMR_China_Local 字符串的行,并在末尾插入新行 21 | sed -i '/^FreeDMR_China_Local_192.168.2.33/d' "$dmr_hosts_file" 22 | echo "$FreeDMR_China_LocalStr" >> "$dmr_hosts_file" 23 | 24 | # 显示文件内容 25 | echo "文件 $dmr_hosts_file 的内容:" 26 | cat "$dmr_hosts_file" 27 | 28 | # 处理 /usr/local/etc/DMR_Hosts.txt 文件 29 | dmr_hosts_file_custom="/usr/local/etc/DMR_Hosts.txt" 30 | 31 | # 删除包含 FreeDMR_China_Local 字符串的行,并在包含 FreeDMR_China\t 字符串的行后插入新行,(注意:\t是TAB制表 符号) 32 | sed -i '/^FreeDMR_China_Local_192.168.2.33/d' "$dmr_hosts_file_custom" 33 | sed -i '/^FreeDMR_China\t/a '"$FreeDMR_China_LocalStr" "$dmr_hosts_file_custom" 34 | 35 | # 显示文件内容 36 | echo "文件 $dmr_hosts_file_custom 的内容:" 37 | cat "$dmr_hosts_file_custom" 38 | 39 | 40 | echo "====================/etc/dmrgateway freeDMR Config sample =================" 41 | echo "[DMR Network 2]" 42 | echo "Enabled=1" 43 | echo "Address=192.168.2.33" 44 | echo "Port=62031" 45 | echo "TGRewrite0=2,9,2,9,1" 46 | echo "PCRewrite0=2,94000,2,4000,1001" 47 | echo "TypeRewrite0=2,9990,2,9990" 48 | echo "SrcRewrite0=2,4000,2,9,1001" 49 | echo "PassAllPC0=1" 50 | echo "PassAllTG0=1" 51 | echo "PassAllPC1=2" 52 | echo "PassAllTG1=2" 53 | echo 'Password="passw0rd"' 54 | echo "Debug=1" 55 | echo "Id=460072402" 56 | echo "Location=0" 57 | echo "Name=FreeDMR_China_Local_192.168.2.33" 58 | echo '#Simplex Mode,Static TG' 59 | echo 'Options="TS2=460755;TIMER=15"' 60 | echo '#Duplex mode' 61 | echo 'Options="TS1=46001;TS2=460755;DIAL=0;TIMER=10;"' 62 | -------------------------------------------------------------------------------- /extra-updateScripts/Patch_Add_FreeDMR_China_Local_192.168.2.93_To_ServerList.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Add to Pi-Star FreeDMR Local server list 3 | # sudo curl https://www.bi7jta.cn/files/AndyTaylorTweet/updateScripts/Patch_Add_FreeDMR_China_Local_192.168.2.93_To_ServerList.sh | sudo sh 4 | 5 | # Remount root as writable 6 | sudo mount -o remount,rw / 7 | 8 | #!/bin/bash 9 | 10 | FreeDMR_China_LocalStr="FreeDMR_China_Local_192.168.2.93 9999 192.168.2.93 passw0rd 62031" 11 | 12 | # 处理 /root/DMR_Hosts.txt 文件 13 | dmr_hosts_file="/root/DMR_Hosts.txt" 14 | 15 | # 如果文件不存在,则创建 16 | if [ ! -e "$dmr_hosts_file" ]; then 17 | touch "$dmr_hosts_file" 18 | fi 19 | 20 | # 删除包含 FreeDMR_China_Local 字符串的行,并在末尾插入新行 21 | sed -i '/^FreeDMR_China_Local_192.168.2.93/d' "$dmr_hosts_file" 22 | echo "$FreeDMR_China_LocalStr" >> "$dmr_hosts_file" 23 | 24 | # 显示文件内容 25 | echo "文件 $dmr_hosts_file 的内容:" 26 | cat "$dmr_hosts_file" 27 | 28 | # 处理 /usr/local/etc/DMR_Hosts.txt 文件 29 | dmr_hosts_file_custom="/usr/local/etc/DMR_Hosts.txt" 30 | 31 | # 删除包含 FreeDMR_China_Local 字符串的行,并在包含 FreeDMR_China\t 字符串的行后插入新行,(注意:\t是TAB制表 符号) 32 | sed -i '/^FreeDMR_China_Local_192.168.2.93/d' "$dmr_hosts_file_custom" 33 | sed -i '/^FreeDMR_China\t/a '"$FreeDMR_China_LocalStr" "$dmr_hosts_file_custom" 34 | 35 | # 显示文件内容 36 | echo "文件 $dmr_hosts_file_custom 的内容:" 37 | cat "$dmr_hosts_file_custom" 38 | 39 | 40 | echo "====================/etc/dmrgateway freeDMR Config sample =================" 41 | echo "[DMR Network 2]" 42 | echo "Enabled=1" 43 | echo "Address=192.168.2.93" 44 | echo "Port=62031" 45 | echo "TGRewrite0=2,9,2,9,1" 46 | echo "PCRewrite0=2,94000,2,4000,1001" 47 | echo "TypeRewrite0=2,9990,2,9990" 48 | echo "SrcRewrite0=2,4000,2,9,1001" 49 | echo "PassAllPC0=1" 50 | echo "PassAllTG0=1" 51 | echo "PassAllPC1=2" 52 | echo "PassAllTG1=2" 53 | echo 'Password="passw0rd"' 54 | echo "Debug=1" 55 | echo "Id=460072402" 56 | echo "Location=0" 57 | echo "Name=FreeDMR_China_Local_192.168.2.93" 58 | echo '#Simplex Mode,Static TG' 59 | echo 'Options="TS2=460755;TIMER=15"' 60 | echo '#Duplex mode' 61 | echo 'Options="TS1=46001;TS2=460755;DIAL=0;TIMER=10;"' 62 | -------------------------------------------------------------------------------- /extra-updateScripts/Patch_Add_FreeDMR_China_Local_192.168.31.118_To_ServerList.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Add to Pi-Star FreeDMR Local server list 3 | # sudo curl https://www.bi7jta.cn/files/AndyTaylorTweet/updateScripts/Patch_Add_FreeDMR_China_Local_192.168.31.118_To_ServerList.sh | sudo sh 4 | 5 | # Remount root as writable 6 | sudo mount -o remount,rw / 7 | 8 | #!/bin/bash 9 | 10 | FreeDMR_China_LocalStr="FreeDMR_China_Local_192.168.31.118 9999 192.168.31.118 passw0rd 62031" 11 | 12 | # 处理 /root/DMR_Hosts.txt 文件 13 | dmr_hosts_file="/root/DMR_Hosts.txt" 14 | 15 | # 如果文件不存在,则创建 16 | if [ ! -e "$dmr_hosts_file" ]; then 17 | touch "$dmr_hosts_file" 18 | fi 19 | 20 | # 删除包含 FreeDMR_China_Local 字符串的行,并在末尾插入新行 21 | sed -i '/^FreeDMR_China_Local_192.168.31.118 /d' "$dmr_hosts_file" 22 | echo "$FreeDMR_China_LocalStr" >> "$dmr_hosts_file" 23 | 24 | # 显示文件内容 25 | echo "文件 $dmr_hosts_file 的内容:" 26 | cat "$dmr_hosts_file" 27 | 28 | # 处理 /usr/local/etc/DMR_Hosts.txt 文件 29 | dmr_hosts_file_custom="/usr/local/etc/DMR_Hosts.txt" 30 | 31 | # 删除包含 FreeDMR_China_Local 字符串的行,并在包含 FreeDMR_China\t 字符串的行后插入新行,(注意:\t是TAB制表 符号) 32 | sed -i '/^FreeDMR_China_Local_192.168.31.118 /d' "$dmr_hosts_file_custom" 33 | sed -i '/^FreeDMR_China\t/a '"$FreeDMR_China_LocalStr" "$dmr_hosts_file_custom" 34 | 35 | # 显示文件内容 36 | echo "文件 $dmr_hosts_file_custom 的内容:" 37 | cat "$dmr_hosts_file_custom" 38 | 39 | 40 | echo "====================/etc/dmrgateway freeDMR Config sample =================" 41 | echo "[DMR Network 2]" 42 | echo "Enabled=1" 43 | echo "Address=192.168.2.33" 44 | echo "Port=62031" 45 | echo "TGRewrite0=2,9,2,9,1" 46 | echo "PCRewrite0=2,94000,2,4000,1001" 47 | echo "TypeRewrite0=2,9990,2,9990" 48 | echo "SrcRewrite0=2,4000,2,9,1001" 49 | echo "PassAllPC0=1" 50 | echo "PassAllTG0=1" 51 | echo "PassAllPC1=2" 52 | echo "PassAllTG1=2" 53 | echo 'Password="passw0rd"' 54 | echo "Debug=1" 55 | echo "Id=460072402" 56 | echo "Location=0" 57 | echo "Name=FreeDMR_China_Local_192.168.31.118 " 58 | echo '#Simplex Mode,Static TG' 59 | echo 'Options="TS2=460755;TIMER=15"' 60 | echo '#Duplex mode' 61 | echo 'Options="TS1=46001;TS2=460755;DIAL=0;TIMER=10;"' 62 | -------------------------------------------------------------------------------- /extra-updateScripts/Patch_Add_FreeDMR_China_Local_To_ServerList.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Add to Pi-Star FreeDMR Local server list 3 | # sudo curl https://www.bi7jta.cn/files/AndyTaylorTweet/updateScripts/Patch_Add_FreeDMR_China_Local_To_ServerList.sh | sudo sh 4 | 5 | # Remount root as writable 6 | sudo mount -o remount,rw / 7 | 8 | #!/bin/bash 9 | 10 | FreeDMR_China_LocalStr="FreeDMR_China_Local 9999 192.168.2.33 passw0rd 62031" 11 | 12 | # 处理 /root/DMR_Hosts.txt 文件 13 | dmr_hosts_file="/root/DMR_Hosts.txt" 14 | 15 | # 如果文件不存在,则创建 16 | if [ ! -e "$dmr_hosts_file" ]; then 17 | touch "$dmr_hosts_file" 18 | fi 19 | 20 | # 删除包含 FreeDMR_China_Local 字符串的行,并在末尾插入新行 21 | sed -i '/^FreeDMR_China_Local/d' "$dmr_hosts_file" 22 | echo "$FreeDMR_China_LocalStr" >> "$dmr_hosts_file" 23 | 24 | # 显示文件内容 25 | echo "文件 $dmr_hosts_file 的内容:" 26 | cat "$dmr_hosts_file" 27 | 28 | # 处理 /usr/local/etc/DMR_Hosts.txt 文件 29 | dmr_hosts_file_custom="/usr/local/etc/DMR_Hosts.txt" 30 | 31 | # 删除包含 FreeDMR_China_Local 字符串的行,并在包含 FreeDMR_China\t 字符串的行后插入新行,(注意:\t是TAB制表 符号) 32 | sed -i '/^FreeDMR_China_Local/d' "$dmr_hosts_file_custom" 33 | sed -i '/^FreeDMR_China\t/a '"$FreeDMR_China_LocalStr" "$dmr_hosts_file_custom" 34 | 35 | # 显示文件内容 36 | echo "文件 $dmr_hosts_file_custom 的内容:" 37 | cat "$dmr_hosts_file_custom" 38 | 39 | 40 | echo "====================/etc/dmrgateway freeDMR Config sample =================" 41 | echo "[DMR Network 2]" 42 | echo "Enabled=1" 43 | echo "Address=192.168.2.33" 44 | echo "Port=62031" 45 | echo "TGRewrite0=2,9,2,9,1" 46 | echo "PCRewrite0=2,94000,2,4000,1001" 47 | echo "TypeRewrite0=2,9990,2,9990" 48 | echo "SrcRewrite0=2,4000,2,9,1001" 49 | echo "PassAllPC0=1" 50 | echo "PassAllTG0=1" 51 | echo "PassAllPC1=2" 52 | echo "PassAllTG1=2" 53 | echo 'Password="passw0rd"' 54 | echo "Debug=1" 55 | echo "Id=460072402" 56 | echo "Location=0" 57 | echo "Name=FreeDMR_China9" 58 | echo '#Simplex Mode,Static TG' 59 | echo 'Options="TS2=460755;TIMER=15"' 60 | echo '#Duplex mode' 61 | echo 'Options="TS1=46001;TS2=460755;DIAL=0;TIMER=10;"' 62 | -------------------------------------------------------------------------------- /extra-updateScripts/Patch_Add_FullEdit_MMDVMHost_to-MW0MWZ_PI-STAR_V_4.2.0.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Remount root as writable 4 | sudo mount -o remount,rw / 5 | 6 | echo "execute:sudo curl https://www.bi7jta.cn/files/AndyTaylorTweet/updateScripts/Patch_Add_FullEdit_MMDVMHost_to-MW0MWZ_PI-STAR_V_4.2.0.sh | sudo sh " 7 | 8 | fulledit_mmdvmhost="/var/www/dashboard/admin/expert/fulledit_mmdvmhost.php" 9 | header_menu_inc="/var/www/dashboard/admin/expert/header-menu.inc" 10 | 11 | curl -# -o ${fulledit_mmdvmhost} https://www.bi7jta.cn/files/AndyTaylorTweet/updateScripts/patch/MW0MWZ/fulledit_mmdvmhost.inc 12 | curl -# -o ${header_menu_inc} https://www.bi7jta.cn/files/AndyTaylorTweet/updateScripts/patch/MW0MWZ/header-menu.inc 13 | 14 | 15 | echo "DONE!" 16 | -------------------------------------------------------------------------------- /extra-updateScripts/Patch_Add_HDMI_Chrome_AutoStart_BPiM2.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | echo "Add_BPiM2_HDMI_Chrome_AutoStart, 对于ASL 4B版本,V2.2发布时,没有包含文件 /home/pi/.config/lxsession/LXDE-pi/autostart ,这里修复" 3 | # sudo curl https://www.bi7jta.cn/files/AndyTaylorTweet/updateScripts/Patch_Add_HDMI_Chrome_AutoStart_BPiM2.sh | sudo sh 4 | 5 | # Remount root as writable 6 | sudo mount -o remount,rw / 7 | sudo mount -o remount,rw /boot 8 | 9 | # 前提,先安装桌面组件,刷桌面版pi-star 10 | # 替换开机检测分辨率, 11 | sudo sed -i "s#\#hdmi_force_hotplug=1#hdmi_force_hotplug=1#g" /boot/config.txt 12 | sudo sed -i "s#\#hdmi_group=1#hdmi_group=2#g" /boot/config.txt 13 | sudo sed -i "s#\#hdmi_mode=1#hdmi_mode=82#g" /boot/config.txt 14 | cat /boot/config.txt 15 | 16 | # 删除以支持重复执行 17 | sudo sed -i "/@xrandr -s 1920x1080/d" /etc/xdg/lxsession/LXDE-pi/autostart 18 | sudo sed -i '$a@xrandr -s 1920x1080' /etc/xdg/lxsession/LXDE-pi/autostart 19 | cat /etc/xdg/lxsession/LXDE-pi/autostart 20 | 21 | echo "=========== BPiM2 ===========" 22 | # 删除重复的项 23 | sudo sed -i "/@xset/d" /home/pi/.config/lxsession/LXDE-pi/autostart 24 | # 重新添加 25 | sudo sed -i '$a@xset s off' /home/pi/.config/lxsession/LXDE-pi/autostart 26 | sudo sed -i '$a@xset s noblank' /home/pi/.config/lxsession/LXDE-pi/autostart 27 | sudo sed -i '$a@xset -dpms' /home/pi/.config/lxsession/LXDE-pi/autostart 28 | 29 | # 删除重复的项 30 | sudo sed -i "/@chromium-browser/d" /home/pi/.config/lxsession/LXDE-pi/autostart 31 | # 重新添加 32 | sudo sed -i '$a@chromium-browser --noerrdialogs --start-fullscreen --incognito http://localhost' /home/pi/.config/lxsession/LXDE-pi/autostart 33 | 34 | sudo sed -i "/@xrandr -s 1920x1080/d" /home/pi/.config/lxsession/LXDE-pi/autostart 35 | sudo sed -i '$a@xrandr -s 1920x1080' /home/pi/.config/lxsession/LXDE-pi/autostart 36 | cat /home/pi/.config/lxsession/LXDE-pi/autostart 37 | 38 | echo "=========== 树莓派 ===========" 39 | #!/bin/bash 40 | 41 | file_path="/home/repeater/.config/lxsession/LXDE-pi/autostart" 42 | parent_directory="$(dirname "$file_path")" 43 | content="@lxpanel --profile LXDE-pi 44 | @pcmanfm --desktop --profile LXDE-pi 45 | @xscreensaver -no-splash 46 | @point-rpi 47 | @xset s off 48 | @xset s noblank 49 | @xset -dpms 50 | @chromium-browser --noerrdialogs --start-fullscreen --incognito http://localhost 51 | @xrandr -s 1920x1080" 52 | 53 | # 检查目录是否存在 54 | if [ -d "/home/repeater/" ]; then 55 | # 检查文件是否存在 56 | if [ ! -f "$file_path" ]; then 57 | # 创建父目录 58 | mkdir -p "$parent_directory" 59 | 60 | # 将内容写入文件 61 | echo "$content" > "$file_path" 62 | 63 | echo "文件创建并写入成功" 64 | else 65 | echo "文件已经存在,不需要创建" 66 | fi 67 | else 68 | echo "目录 /home/repeater/ 不存在" 69 | fi 70 | 71 | 72 | echo "完成,重启生效!Done, Reboot to use " -------------------------------------------------------------------------------- /extra-updateScripts/Patch_Add_HDMI_Chrome_AutoStart_RPi5B2W.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | echo "=========== 树莓派5B,2W 理论上发布基础IMG时已经包含,不需要执行此脚本,仅供自己使用 ===========" 3 | # sudo curl https://www.bi7jta.cn/files/AndyTaylorTweet/updateScripts/Patch_Add_HDMI_Chrome_AutoStart_RPi5B2W.sh | sudo sh 4 | 5 | # Remount root as writable 6 | sudo mount -o remount,rw / 7 | sudo mount -o remount,rw /boot 8 | 9 | # 前提,先安装桌面组件,刷桌面版pi-star 10 | # 替换开机检测分辨率, 11 | sudo sed -i "s#\#hdmi_force_hotplug=1#hdmi_force_hotplug=1#g" /boot/config.txt 12 | sudo sed -i "s#\#hdmi_group=1#hdmi_group=2#g" /boot/config.txt 13 | sudo sed -i "s#\#hdmi_mode=1#hdmi_mode=82#g" /boot/config.txt 14 | cat /boot/config.txt 15 | 16 | # 删除以支持重复执行 17 | sudo sed -i "/@xrandr -s 1920x1080/d" /etc/xdg/lxsession/LXDE-pi/autostart 18 | sudo sed -i '$a@xrandr -s 1920x1080' /etc/xdg/lxsession/LXDE-pi/autostart 19 | cat /etc/xdg/lxsession/LXDE-pi/autostart 20 | 21 | file_path="/home/pi-star/.config/lxsession/LXDE-pi/autostart" 22 | parent_directory="$(dirname "$file_path")" 23 | content="@lxpanel --profile LXDE-pi 24 | @pcmanfm --desktop --profile LXDE-pi 25 | @xscreensaver -no-splash 26 | @point-rpi 27 | @xset s off 28 | @xset s noblank 29 | @xset -dpms 30 | @chromium-browser --noerrdialogs --start-fullscreen --incognito http://localhost 31 | @xrandr -s 1920x1080" 32 | 33 | # 检查目录是否存在 34 | if [ -d "/home/pi-star/" ]; then 35 | # 检查文件是否存在 36 | if [ ! -f "$file_path" ]; then 37 | # 创建父目录 38 | mkdir -p "$parent_directory" 39 | 40 | # 将内容写入文件 41 | echo "$content" > "$file_path" 42 | 43 | echo "文件创建并写入成功" 44 | else 45 | echo "文件已经存在,不需要创建" 46 | fi 47 | else 48 | echo "目录 /home/pi-star/ 不存在" 49 | fi 50 | 51 | 52 | echo "完成,重启生效!Done, Reboot to use " -------------------------------------------------------------------------------- /extra-updateScripts/Patch_Add_XLX_JTA_To_List.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Add to Pi-Star XLX reflector choose list 3 | # sudo curl https://www.bi7jta.cn/files/AndyTaylorTweet/updateScripts/Patch_Add_XLX_JTA_To_List.sh | sudo sh 4 | 5 | # Remount root as writable 6 | sudo mount -o remount,rw / 7 | 8 | sudo touch /root/XLXHosts.txt 9 | #判断文件大小是否为0,为零时,sed插入无效 10 | if [ ! -s /root/XLXHosts.txt ]; then 11 | sudo sh -c 'echo "" > /root/XLXHosts.txt' #sed 无法插入touch生成的空文件,先插入一个空格 12 | else 13 | echo "文件大小不为零" 14 | fi 15 | #先删除行关键字的行:JTA;125.91.17.122;4004,这是不联46001的房间D 16 | sudo sed -i "/JTA;125.91.17.122;4004/d" /usr/local/etc/XLXHosts.txt 17 | sudo sed -i "/JTA;125.91.17.122;4004/d" /root/XLXHosts.txt 18 | 19 | #这是不联46001的房间C 20 | sudo sed -i "/JTAC;125.91.17.122;4003/d" /usr/local/etc/XLXHosts.txt 21 | sudo sed -i "/JTAC;125.91.17.122;4003/d" /root/XLXHosts.txt 22 | 23 | #在/usr/local/etc/XLXHosts.txt 插入行首:JTA;125.91.17.122;4004 24 | sudo sed -i '1iJTA;125.91.17.122;4004' /usr/local/etc/XLXHosts.txt 25 | sudo sed -i '1iJTA;125.91.17.122;4004' /root/XLXHosts.txt #同时加入/root/XLXHosts.txt 避免更新时覆盖, 26 | 27 | #这是不联46001的房间C 28 | sudo sed -i '1iJTAC;125.91.17.122;4003' /usr/local/etc/XLXHosts.txt 29 | sudo sed -i '1iJTAC;125.91.17.122;4003' /root/XLXHosts.txt #同时加入/root/XLXHosts.txt 避免更新时覆盖, 30 | 31 | 32 | echo "=============/usr/local/etc/XLXHosts.txt=============" 33 | cat /usr/local/etc/XLXHosts.txt |grep JTA 34 | 35 | echo "=============/root/XLXHosts.txt=============" 36 | cat /root/XLXHosts.txt 37 | 38 | 39 | sudo touch /root/DMR_Hosts.txt 40 | #判断文件大小是否为0,为零时,sed插入无效 41 | if [ ! -s /root/DMR_Hosts.txt ]; then 42 | sudo sh -c 'echo "" > /root/DMR_Hosts.txt' #sed 无法插入touch生成的空文件,先插入一个空格 43 | else 44 | echo "文件大小不为零" 45 | fi 46 | 47 | #先删除关键字为:XLX_JTA的行 48 | #在/usr/local/etc/DMR_Hosts.txt 找到第一个XLX,插入一行 49 | sudo sed -i "/XLX_JTA/d" /usr/local/etc/DMR_Hosts.txt 50 | sudo sed -i "/XLX_JTA/d" /root/DMR_Hosts.txt 51 | 52 | #这是不联46001的房间C,TODO 其实上一句已经删掉 53 | sudo sed -i "/XLX_JTAC/d" /usr/local/etc/DMR_Hosts.txt 54 | sudo sed -i "/XLX_JTAC/d" /root/DMR_Hosts.txt 55 | 56 | #在/usr/local/etc/DMR_Hosts.txt 插入行首:“XLX_JTA 0000 125.91.17.122 passw0rd 62030” 57 | sudo sed -i '1iXLX_JTA\ 0000\ 125.91.17.122\ passw0rd\ 62030' /usr/local/etc/DMR_Hosts.txt 58 | sudo sed -i '1iXLX_JTA\ 0000\ 125.91.17.122\ passw0rd\ 62030' /root/DMR_Hosts.txt #同时加入/root/DMR_Hosts.txt 避免更新时覆盖, 59 | 60 | #这是不联46001的房间C 61 | sudo sed -i '1iXLX_JTAC\ 0000\ 125.91.17.122\ passw0rd\ 62030' /usr/local/etc/DMR_Hosts.txt 62 | sudo sed -i '1iXLX_JTAC\ 0000\ 125.91.17.122\ passw0rd\ 62030' /root/DMR_Hosts.txt #同时加入/root/DMR_Hosts.txt 避免更新时覆盖, 63 | 64 | echo "=============/usr/local/etc/DMR_Hosts.txt=============" 65 | cat /usr/local/etc/DMR_Hosts.txt |grep XLX_JTA 66 | 67 | echo "=============/root/DMR_Hosts.txt=============" 68 | cat /root/DMR_Hosts.txt 69 | 70 | echo "Done" -------------------------------------------------------------------------------- /extra-updateScripts/Patch_Change_CSS_to_GrayColor.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # sudo curl https://www.bi7jta.cn/files/AndyTaylorTweet/updateScripts/Patch_Change_CSS_to_GrayColor.sh | sudo sh 4 | 5 | if [ "$(id -u)" != "0" ]; then 6 | echo -e "You need to be root to run this command...\n" 7 | exit 1 8 | fi 9 | 10 | # Remount root as writable 11 | sudo mount -o remount,rw / 12 | 13 | rm pistar-css_Gray.ini 14 | curl -OL https://www.bi7jta.cn/files/AndyTaylorTweet/updateScripts/pistar-css_Gray.ini; 15 | 16 | if [ ! -s pistar-css_Gray.ini ]; then 17 | echo "CSS文件下载失败,大小为零" 18 | exit 1 19 | else 20 | echo "文件大小不为零" 21 | cp pistar-css_Gray.ini /etc/pistar-css.ini 22 | fi 23 | 24 | echo "完成,刷新生效!Done, Refresh to use " -------------------------------------------------------------------------------- /extra-updateScripts/Patch_Change_CSS_to_PinkColor.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Add_BPiM2_HDMI_Chrome_AutoStart 3 | # sudo curl https://www.bi7jta.cn/files/AndyTaylorTweet/updateScripts/Patch_Change_CSS_to_PinkColor.sh | sudo sh 4 | 5 | if [ "$(id -u)" != "0" ]; then 6 | echo -e "You need to be root to run this command...\n" 7 | exit 1 8 | fi 9 | 10 | # Remount root as writable 11 | sudo mount -o remount,rw / 12 | 13 | rm pistar-css-Color_pink.ini 14 | curl -OL https://www.bi7jta.cn/files/AndyTaylorTweet/updateScripts/pistar-css-Color_pink.ini; 15 | 16 | if [ ! -s pistar-css-Color_pink.ini ]; then 17 | echo "CSS文件下载失败,大小为零" 18 | exit 1 19 | else 20 | echo "文件大小不为零" 21 | cp pistar-css-Color_pink.ini /etc/pistar-css.ini 22 | fi 23 | 24 | echo "完成,刷新生效!Done, Refresh to use " -------------------------------------------------------------------------------- /extra-updateScripts/Patch_Disable-WiFi-MAC-Randomization.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # sudo curl https://www.bi7jta.cn/files/AndyTaylorTweet/updateScripts/Patch_Disable-WiFi-MAC-Randomization.sh | sudo sh 3 | 4 | 5 | # sudo vi /etc/NetworkManager/conf.d/100-disable-wifi-mac-randomization.conf 6 | 7 | # 插入以下内容: 8 | 9 | # [connection] 10 | # wifi.mac-address-randomization=1 11 | 12 | # [device] 13 | # wifi.scan-rand-mac-address=no 14 | 15 | # 重启树莓派 16 | 17 | # reboot 18 | 19 | # 小技巧: 20 | # 卸载不好用的精简版vi, 21 | # sudo apt-get -y remove vim-common; 22 | # 安装完整功能的vim 23 | # sudo apt-get -y install vim ; 24 | 25 | # 问ChatGPT: 26 | # 编写shell脚本,在文件 27 | # /etc/NetworkManager/conf.d/100-disable-wifi-mac-randomization.conf 28 | # 中查找包含 29 | # [connection] 30 | # wifi.mac-address-randomization 31 | # 的行,删除,并插入 32 | # [connection] 33 | # wifi.mac-address-randomization=1 34 | # , 35 | 36 | # 查找包含和包含 37 | # [device] 38 | # wifi.scan-rand-mac-address 39 | # 的行,删除,并插入 40 | # [device] 41 | # wifi.scan-rand-mac-address=no 42 | 43 | # 答案: 44 | #!/bin/bash 45 | 46 | # 检查文件是否存在 47 | config_dir="/etc/NetworkManager/conf.d/" 48 | config_file="/etc/NetworkManager/conf.d/100-disable-wifi-mac-randomization.conf" 49 | if [ ! -e "$config_file" ]; then 50 | echo "文件 $config_file 不存在,Create it" 51 | mkdir -p ${config_dir} 52 | touch "$config_file" 53 | fi 54 | 55 | # 处理 [connection] wifi.mac-address-randomization 56 | if grep -q "\[connection\]" "$config_file" && grep -q "wifi\.mac-address-randomization" "$config_file"; then 57 | sed -i '/^\[connection\]/,/^$/ s/wifi\.mac-address-randomization.*/wifi\.mac-address-randomization=1/' "$config_file" 58 | else 59 | echo "[connection]\nwifi.mac-address-randomization=1" >> "$config_file" 60 | fi 61 | 62 | # 处理 [device] wifi.scan-rand-mac-address 63 | if grep -q "\[device\]" "$config_file" && grep -q "wifi\.scan-rand-mac-address" "$config_file"; then 64 | sed -i '/^\[device\]/,/^$/ s/wifi\.scan-rand-mac-address.*/wifi\.scan-rand-mac-address=no/' "$config_file" 65 | else 66 | echo "[device]\nwifi.scan-rand-mac-address=no" >> "$config_file" 67 | fi 68 | 69 | cat ${config_file} 70 | echo "脚本执行完毕" 71 | -------------------------------------------------------------------------------- /extra-updateScripts/Patch_Disable_Dhcpcd_verbose_log_BPiM2.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Patch_Disable_Dhcpcd_verbose_log_BPiM2 3 | # sudo curl https://www.bi7jta.cn/files/AndyTaylorTweet/updateScripts/Patch_Disable_Dhcpcd_verbose_log_BPiM2.sh | sudo sh 4 | 5 | # Remount root as writable 6 | sudo mount -o remount,rw / 7 | 8 | echo "Disable dhcpcd verbose log, cause /var/log 64M full one moment, appear in BPiM2."; 9 | 10 | dhcpcd_conf="/etc/dhcpcd.conf" 11 | nohook_line="nohook syslog" 12 | 13 | # 判断 /etc/dhcpcd.conf 是否存在 14 | if [ -e "$dhcpcd_conf" ]; then 15 | # 检查文件中是否存在以 nohook syslog 开头的行 16 | #if ! grep -qF "^$nohook_line" "$dhcpcd_conf"; then #判断不准,改为: 17 | if ! awk -v pattern="$nohook_line" '$0 ~ pattern { found=1; exit } END { exit !found }' "$dhcpcd_conf"; then 18 | # 在文件末尾添加 nohook syslog 行 19 | sudo bash -c "echo '$nohook_line' >> $dhcpcd_conf" 20 | echo "'nohook syslog' line added to the end of $dhcpcd_conf" 21 | cat $dhcpcd_conf 22 | 23 | # 重启 dhcpcd 服务 24 | sudo systemctl restart dhcpcd 25 | sudo dhclient -r 26 | sudo dhclient 27 | 28 | echo "dhcpcd service restarted, will takes effect now " 29 | else 30 | echo "'nohook syslog' line already exists in $dhcpcd_conf ,skip it" 31 | fi 32 | else 33 | echo "Error: $dhcpcd_conf not found." 34 | fi 35 | 36 | echo "show me the size: /var/log/... " 37 | 38 | find /var/log -type f -exec du -h --apparent-size {} + | sort -rh 39 | du -h /var/log 40 | echo "Shrink : /var/log/ the file size larger than 1MB" 41 | find /var/log/ -type f -size +1M -exec sh -c 'tail -n 500 {} > {}' \; 42 | 43 | echo "show me the size again: /var/log/... " 44 | find /var/log -type f -exec du -h --apparent-size {} + | sort -rh 45 | du -h /var/log 46 | 47 | 48 | -------------------------------------------------------------------------------- /extra-updateScripts/Patch_FIX_I2C_OLED_NOT_ENABLE.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # FIX_I2C_OLED_NOT_ENABLE 3 | # sudo curl https://www.bi7jta.cn/files/AndyTaylorTweet/updateScripts/Patch_FIX_I2C_OLED_NOT_ENABLE.sh | sudo sh 4 | 5 | # Remount root as writable 6 | sudo mount -o remount,rw / 7 | sudo mount -o remount,rw /boot 8 | 9 | config_file="/boot/config.txt" 10 | search_pattern="#.*dtparam=i2c_arm=on$" 11 | insert_line="dtparam=i2c_arm=on" 12 | 13 | # 检查是否存在包含指定模式的行 14 | if grep -qE "$search_pattern" "$config_file"; then 15 | # 如果存在,去掉注释符号 16 | sudo sed -i -E "s/$search_pattern/$insert_line/" "$config_file" 17 | echo "I2C NOT set, enable it" 18 | grep -i "$insert_line" "$config_file" 19 | fi 20 | 21 | # 再次检查是否存在以dtparam=i2c_arm=on开头的行 22 | if ! grep -qE "^$insert_line" "$config_file"; then 23 | echo "不存在,${insert_line} , 插入新行到文件末尾" 24 | echo "$insert_line" | sudo tee -a "$config_file" 25 | grep -i "$insert_line" "$config_file" 26 | 27 | fi 28 | 29 | cat "$config_file" 30 | 31 | echo "DONE! Reboot to use I2C_OLED display" 32 | echo "完成,重启你的热点,让OLED配置生效" -------------------------------------------------------------------------------- /extra-updateScripts/Patch_Fix_ASL-3in1-OS-SSL_Certs_not_update_bug.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Fix Error, curl: (60) SSL certificate problem: unable to get local issuer certificate 3 | # When curl from https://www.bi7jta.cn https://www.bi7jta.org 4 | # sudo curl https://www.bi7jta.cn/files/AndyTaylorTweet/updateScripts/Patch_Fix_ASL-3in1-OS-SSL_Certs_not_update_bug.sh | sudo sh 5 | 6 | # Remount root as writable 7 | sudo mount -o remount,rw / 8 | 9 | # 判断只有Allstarlink OS才执行此操作,其它环境无需处理 10 | if [ -e /lib/systemd/system/asl-asterisk.service ]; then 11 | echo "Is a ASL OS, run patch..." 12 | else 13 | echo "Not an ASL OS, not need run this patch." 14 | exit 0 15 | fi 16 | 17 | cd /home/pi-star 18 | rm -rf certs 19 | 20 | # 21 | if [ -e /usr/local/sbin/patch-scripts/certs.zip ]; then 22 | echo "certs.zip exist" 23 | else 24 | echo "/usr/local/sbin/patch-scripts/certs.zip Not exist, Now force update /usr/local/sbin" 25 | cd /usr/local/sbin 26 | git reset --hard && git clean -f #使本地完全回退到上次 commit 27 | git fetch --all 28 | # Reset local modified, 29 | git reset --hard origin/master 30 | # Pull new updated, 31 | git pull -q origin master 32 | #会不会删除当前脚本文件? 33 | fi 34 | 35 | cd /home/pi-star 36 | 37 | if [ -e /usr/local/sbin/patch-scripts/certs.zip ]; then 38 | cp -f /usr/local/sbin/patch-scripts/certs.zip ./ 39 | unzip certs.zip 40 | ls -lh certs/ 41 | else 42 | echo "After git update, /usr/local/sbin/patch-scripts/certs.zip Still Not exist, Error appear! " 43 | exit 1 44 | fi 45 | 46 | cp -rf certs/* /etc/ssl/certs/ 47 | 48 | TestURL="https://www.bi7jta.cn/files/AndyTaylorTweet/updateScripts/Patch_Fix_ASL-3in1-OS-SSL_Certs_not_update_bug.sh" 49 | echo "Test if ok ? ${TestURL}" 50 | 51 | curl -OL ${TestURL} 52 | 53 | echo "Done" -------------------------------------------------------------------------------- /extra-updateScripts/Patch_Fix_P25GatewayConfig.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # sudo curl https://www.bi7jta.cn/files/AndyTaylorTweet/updateScripts/Patch_Fix_P25GatewayConfig.sh | sudo sh 4 | 5 | # Remount root as writable 6 | sudo mount -o remount,rw / 7 | 8 | sudo touch /tmp/tmpUpdatePath.log; 9 | sudo chmod 777 /tmp/tmpUpdatePath.log; 10 | 11 | #FIX p25gateway no data 12 | FIND_STR="\[Network\]" 13 | if [ `grep -c "$FIND_STR" /etc/p25gateway ` -ne '0' ];then 14 | echo "Find $FIND_STR in p25gateway, ignore it." 15 | else 16 | echo "${FIND_STR} NOT FOUND, fix it" 17 | cp /usr/local/sbin/patch-scripts/p25gateway.txt /etc/p25gateway 18 | fi 19 | cat /etc/p25gateway 20 | 21 | echo "完成,刷新生效!Done, refresh to use " -------------------------------------------------------------------------------- /extra-updateScripts/Patch_Fix_apt_sources_list_2PCS_raspbian_Segments.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # sudo curl https://www.bi7jta.cn/files/AndyTaylorTweet/updateScripts/Patch_Fix_apt_sources_list_2PCS_raspbian_Segments.sh | sudo sh 3 | if [ "$(id -u)" != "0" ]; then 4 | echo -e "You need to be root to run this command...\n" 5 | exit 1 6 | fi 7 | 8 | sudo mount -o remount,rw / 9 | # 修复多余的/raspbian 10 | sudo sed -i 's#/raspbian/raspbian/#/raspbian/#g' /etc/apt/sources.list 11 | 12 | 13 | echo "Done"; 14 | -------------------------------------------------------------------------------- /extra-updateScripts/Patch_HDMI_Chrome_Change_Full.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Add_BPiM2_HDMI_Chrome_AutoStart 3 | # sudo curl https://www.bi7jta.cn/files/AndyTaylorTweet/updateScripts/Patch_HDMI_Chrome_Change_Full.sh | sudo sh 4 | 5 | # Remount root as writable 6 | sudo mount -o remount,rw / 7 | 8 | sudo touch /tmp/tmpUpdatePath.log; 9 | sudo chmod 777 /tmp/tmpUpdatePath.log; 10 | 11 | autostartConfig=""; 12 | #if [ -f /home/pi/.config/lxsession/LXDE-pi/autostart ]; then #BPiM2 betty 13 | # autostartConfig="/home/pi/.config/lxsession/LXDE-pi/autostart"; 14 | # echo "Find BPiM2 betty config file in ${autostartConfig}" 15 | #else if [ -f "/home/pi-star/.config/lxsession/LXDE-pi/autostart" ]; then #RPi4B Desktop 16 | # autostartConfig="/home/pi-star/.config/lxsession/LXDE-pi/autostart"; 17 | # echo "Find RPi4B Desktop config file in ${autostartConfig}" 18 | # fi 19 | #else if [ -f "/home/repeater/.config/lxsession/LXDE-pi/autostart" ]; then #J-STAR Desktop 20 | # autostartConfig="/repeater/pi-star/.config/lxsession/LXDE-pi/autostart"; 21 | # echo "Find J-STAR Desktop config file in ${autostartConfig}" 22 | # fi 23 | #fi 24 | 25 | #正确的if elseif 26 | if [ -f /home/pi/.config/lxsession/LXDE-pi/autostart ]; then 27 | autostartConfig="/home/pi/.config/lxsession/LXDE-pi/autostart"; 28 | echo "Find BPiM2 betty config file in ${autostartConfig}" 29 | # 删除重复的项 30 | sudo sed -i "/@chromium-browser/d" ${autostartConfig} 31 | # 重新添加 32 | sudo sed -i '$a@chromium-browser --noerrdialogs --start-fullscreen --incognito http://localhost' ${autostartConfig} 33 | cat ${autostartConfig} 34 | fi 35 | if [ -f "/home/pi-star/.config/lxsession/LXDE-pi/autostart" ]; then 36 | autostartConfig="/home/pi-star/.config/lxsession/LXDE-pi/autostart"; 37 | echo "Find RPi4B Desktop config file in ${autostartConfig}" 38 | # 删除重复的项 39 | sudo sed -i "/@chromium-browser/d" ${autostartConfig} 40 | # 重新添加 41 | sudo sed -i '$a@chromium-browser --noerrdialogs --start-fullscreen --incognito http://localhost' ${autostartConfig} 42 | cat ${autostartConfig} 43 | fi 44 | if [ -f "/home/repeater/.config/lxsession/LXDE-pi/autostart" ]; then 45 | autostartConfig="/home/repeater/.config/lxsession/LXDE-pi/autostart"; 46 | echo "Find J-STAR Desktop config file in ${autostartConfig}" 47 | # 删除重复的项 48 | sudo sed -i "/@chromium-browser/d" ${autostartConfig} 49 | # 重新添加 50 | sudo sed -i '$a@chromium-browser --noerrdialogs --start-fullscreen --incognito http://localhost' ${autostartConfig} 51 | cat ${autostartConfig} 52 | fi 53 | 54 | 55 | echo "完成,重启生效!Done, Reboot to use " -------------------------------------------------------------------------------- /extra-updateScripts/Patch_HDMI_Chrome_Change_LiveCaller.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Add_BPiM2_HDMI_Chrome_AutoStart 3 | # sudo curl https://www.bi7jta.cn/files/AndyTaylorTweet/updateScripts/Patch_HDMI_Chrome_Change_LiveCaller.sh | sudo sh 4 | 5 | # Remount root as writable 6 | sudo mount -o remount,rw / 7 | 8 | sudo touch /tmp/tmpUpdatePath.log; 9 | sudo chmod 777 /tmp/tmpUpdatePath.log; 10 | 11 | autostartConfig=""; 12 | 13 | #正确的if elseif 14 | if [ -f /home/pi/.config/lxsession/LXDE-pi/autostart ]; then 15 | autostartConfig="/home/pi/.config/lxsession/LXDE-pi/autostart"; 16 | echo "Find BPiM2 betty config file in ${autostartConfig}" 17 | # 删除重复的项 18 | sudo sed -i "/@chromium-browser/d" ${autostartConfig} 19 | # 重新添加 20 | sudo sed -i '$a@chromium-browser --noerrdialogs --start-fullscreen --incognito http://localhost/live' ${autostartConfig} 21 | cat ${autostartConfig} 22 | fi 23 | if [ -f "/home/pi-star/.config/lxsession/LXDE-pi/autostart" ]; then 24 | autostartConfig="/home/pi-star/.config/lxsession/LXDE-pi/autostart"; 25 | echo "Find RPi4B Desktop config file in ${autostartConfig}" 26 | # 删除重复的项 27 | sudo sed -i "/@chromium-browser/d" ${autostartConfig} 28 | # 重新添加 29 | sudo sed -i '$a@chromium-browser --noerrdialogs --start-fullscreen --incognito http://localhost/live' ${autostartConfig} 30 | cat ${autostartConfig} 31 | fi 32 | if [ -f "/home/repeater/.config/lxsession/LXDE-pi/autostart" ]; then 33 | autostartConfig="/home/repeater/.config/lxsession/LXDE-pi/autostart"; 34 | echo "Find J-STAR Desktop config file in ${autostartConfig}" 35 | # 删除重复的项 36 | sudo sed -i "/@chromium-browser/d" ${autostartConfig} 37 | # 重新添加 38 | sudo sed -i '$a@chromium-browser --noerrdialogs --start-fullscreen --incognito http://localhost/live' ${autostartConfig} 39 | cat ${autostartConfig} 40 | fi 41 | 42 | 43 | echo "完成,重启生效!Done, Reboot to use " -------------------------------------------------------------------------------- /extra-updateScripts/Patch_HDMI_Chrome_Change_Simple.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Add_BPiM2_HDMI_Chrome_AutoStart 3 | # sudo curl https://www.bi7jta.cn/files/AndyTaylorTweet/updateScripts/Patch_Add_HDMI_Chrome_Simple.sh | sudo sh 4 | 5 | # Remount root as writable 6 | sudo mount -o remount,rw / 7 | 8 | sudo touch /tmp/tmpUpdatePath.log; 9 | sudo chmod 777 /tmp/tmpUpdatePath.log; 10 | 11 | autostartConfig=""; 12 | 13 | #正确的if elseif 14 | if [ -f /home/pi/.config/lxsession/LXDE-pi/autostart ]; then 15 | autostartConfig="/home/pi/.config/lxsession/LXDE-pi/autostart"; 16 | echo "Find config file in ${autostartConfig}" 17 | # 删除重复的项 18 | sudo sed -i "/^@chromium-browser/d" ${autostartConfig} 19 | # 重新添加 20 | sudo sed -i '$a@chromium-browser --noerrdialogs --start-fullscreen --incognito http://localhost/simple' ${autostartConfig} 21 | cat ${autostartConfig} 22 | fi 23 | 24 | autostartConfig=""; 25 | if [ -f "/home/pi-star/.config/lxsession/LXDE-pi/autostart" ]; then 26 | autostartConfig="/home/pi-star/.config/lxsession/LXDE-pi/autostart"; 27 | echo "Find config file in ${autostartConfig}" 28 | # 删除重复的项 29 | sudo sed -i "/^@chromium-browser/d" ${autostartConfig} 30 | # 重新添加 31 | sudo sed -i '$a@chromium-browser --noerrdialogs --start-fullscreen --incognito http://localhost/simple' ${autostartConfig} 32 | cat ${autostartConfig} 33 | fi 34 | 35 | autostartConfig=""; 36 | if [ -f "/home/repeater/.config/lxsession/LXDE-pi/autostart" ]; then 37 | autostartConfig="/home/repeater/.config/lxsession/LXDE-pi/autostart"; 38 | echo "Find config file in ${autostartConfig}" 39 | # 删除重复的项 40 | sudo sed -i "/^@chromium-browser/d" ${autostartConfig} 41 | # 重新添加 42 | sudo sed -i '$a@chromium-browser --noerrdialogs --start-fullscreen --incognito http://localhost/simple' ${autostartConfig} 43 | cat ${autostartConfig} 44 | fi 45 | 46 | 47 | echo "完成,重启生效!Done, Reboot to use " -------------------------------------------------------------------------------- /extra-updateScripts/Patch_HDMI_Chrome_Close.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Add_BPiM2_HDMI_Chrome_AutoStart 3 | # sudo curl https://www.bi7jta.cn/files/AndyTaylorTweet/updateScripts/Patch_HDMI_Chrome_Close.sh | sudo sh 4 | 5 | # Remount root as writable 6 | sudo mount -o remount,rw / 7 | 8 | sudo touch /tmp/tmpUpdatePath.log; 9 | sudo chmod 777 /tmp/tmpUpdatePath.log; 10 | 11 | autostartConfig=""; 12 | #正确的if elseif 13 | if [ -f /home/pi/.config/lxsession/LXDE-pi/autostart ]; then 14 | autostartConfig="/home/pi/.config/lxsession/LXDE-pi/autostart"; 15 | echo "Find config file in ${autostartConfig}" 16 | # 删除启动项 17 | sudo sed -i "/@chromium-browser/d" ${autostartConfig} 18 | cat ${autostartConfig} 19 | fi 20 | if [ -f "/home/pi-star/.config/lxsession/LXDE-pi/autostart" ]; then 21 | autostartConfig="/home/pi-star/.config/lxsession/LXDE-pi/autostart"; 22 | echo "Find config file in ${autostartConfig}" 23 | # 删除启动项 24 | sudo sed -i "/@chromium-browser/d" ${autostartConfig} 25 | cat ${autostartConfig} 26 | fi 27 | if [ -f "/home/repeater/.config/lxsession/LXDE-pi/autostart" ]; then 28 | autostartConfig="/home/repeater/.config/lxsession/LXDE-pi/autostart"; 29 | echo "Find config file in ${autostartConfig}" 30 | # 删除启动项 31 | sudo sed -i "/@chromium-browser/d" ${autostartConfig} 32 | cat ${autostartConfig} 33 | fi 34 | 35 | echo "完成,重启生效!Done, Reboot to use " -------------------------------------------------------------------------------- /extra-updateScripts/Patch_Install_Zip_if_Not_exist.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # sudo curl https://www.bi7jta.cn/files/AndyTaylorTweet/updateScripts/Patch_Install_Zip_if_Not_exist.sh | sudo sh 4 | 5 | echo "Check if 'zip' is already installed" 6 | if ! command -v zip &> /dev/null 7 | then 8 | echo "zip tool is not installed, installing..." 9 | 10 | # Use package manager to install zip 11 | sudo apt update 12 | sudo apt install -y zip 13 | 14 | # Check if the installation was successful 15 | if command -v zip &> /dev/null 16 | then 17 | echo "zip tool installed successfully." 18 | else 19 | echo "Installation failed. Please install the zip tool manually." 20 | exit 0 #表示脚本正常结束,没有发生错误。 21 | fi 22 | else 23 | echo "zip tool is already installed." 24 | fi 25 | -------------------------------------------------------------------------------- /extra-updateScripts/Patch_Modify_DMRGateway-FreeDMR_Host.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Add to Pi-Star FreeDMR Local server list 3 | # sudo curl -o Patch_Modify_DMRGateway-FreeDMR_Host.sh https://www.bi7jta.cn/files/AndyTaylorTweet/updateScripts/Patch_Modify_DMRGateway-FreeDMR_Host.sh 4 | # sudo sh Patch_Modify_DMRGateway-FreeDMR_Host.sh 192.168.31.118 5 | 6 | 7 | 8 | # Remount root as writable 9 | sudo mount -o remount,rw / 10 | 11 | file_path="/etc/dmrgateway" 12 | 13 | # 检查参数是否传入 14 | if [ "$#" -ne 1 ]; then 15 | echo "请提供一个参数作为新的 DMR 地址" 16 | exit 1 17 | fi 18 | 19 | # 传入的参数作为新的 DMR 地址 20 | freeDMRHost="$1" 21 | echo "传入参数为:$freeDMRHost " 22 | 23 | # 检查文件是否存在 24 | if [ -e "$file_path" ]; then 25 | # 使用sed命令进行替换 26 | # 不成功!问ChatGPT 27 | # sed -i "s/\[DMR Network 2\]\nEnabled=1\nAddress=.*/[DMR Network 2]\nEnabled=1\nAddress=$freeDMRHost/" "$file_path" 28 | 29 | # 这个修改在匹配时允许了更多的空白字符,包括空格和制表符。[[:space:]]* 表示匹配零个或多个空白字符。这样就可以适应一些可能存在的额外空格或缩进,从而确保替换的准确性。不会成功! 30 | # sed -i "s/\[DMR Network 2\][[:space:]]*\nEnabled=1[[:space:]]*\nAddress=.*/[DMR Network 2]\nEnabled=1\nAddress=$freeDMRHost/" "$file_path" 31 | 32 | # 换 无效 33 | # sed -i "/\[DMR Network 2\]/,/\[/ {/Enabled=1/ s/Address=.*/Address=$freeDMRHost/}" "$file_path" 34 | 35 | # 无效 36 | # sed -i "/\[DMR\ Network\ 2\]/,/Address=192.168.2.33/ {/Enabled=1/ s/Address=.*/Address=$freeDMRHost/}" "$file_path" 37 | 38 | # 暂时用这个吧 39 | sed -i "/\[DMR Network 2\]/,/Address=192.168.2.33/ s/Address=192.168.2.33/Address=$freeDMRHost/" "$file_path" 40 | 41 | # 显示文件内容 42 | echo "文件 $file_path 的内容:" 43 | cat "$file_path" 44 | else 45 | echo "文件 $file_path 不存在" 46 | fi 47 | 48 | systemctl restart dmrgateway 49 | 50 | echo "====================/etc/dmrgateway freeDMR Config sample =================" 51 | echo "[DMR Network 2]" 52 | echo "Enabled=1" 53 | echo "Address=192.168.2.33" 54 | echo "Port=62031" 55 | echo "TGRewrite0=2,9,2,9,1" 56 | echo "PCRewrite0=2,94000,2,4000,1001" 57 | echo "TypeRewrite0=2,9990,2,9990" 58 | echo "SrcRewrite0=2,4000,2,9,1001" 59 | echo "PassAllPC0=1" 60 | echo "PassAllTG0=1" 61 | echo "PassAllPC1=2" 62 | echo "PassAllTG1=2" 63 | echo 'Password="passw0rd"' 64 | echo "Debug=1" 65 | echo "Id=460072402" 66 | echo "Location=0" 67 | echo "Name=FreeDMR_China9" 68 | echo '#Simplex Mode,Static TG' 69 | echo 'Options="TS2=460755;TIMER=15"' 70 | echo '#Duplex mode' 71 | echo 'Options="TS1=46001;TS2=460755;DIAL=0;TIMER=10;"' 72 | -------------------------------------------------------------------------------- /extra-updateScripts/Patch_Remove_OS_Unattended_upgrades.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Disable OS_Unattended_upgrades, high CPU cost 3 | # sudo curl https://www.bi7jta.cn/files/AndyTaylorTweet/updateScripts/Patch_Remove_OS_Unattended_upgrades.sh | sudo sh 4 | 5 | # Remount root as writable 6 | sudo mount -o remount,rw / 7 | 8 | sudo touch /tmp/tmpUpdatePath.log; 9 | sudo chmod 777 /tmp/tmpUpdatePath.log; 10 | 11 | sudo apt remove -y unattended-upgrades 12 | 13 | top -n 1 14 | 15 | echo "完成,已经生效!Done, now to use " -------------------------------------------------------------------------------- /extra-updateScripts/Patch_Set_CN_LanguageAndTimeZone.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # sudo curl https://www.bi7jta.cn/files/AndyTaylorTweet/updateScripts/Patch_Set_CN_LanguageAndTimeZone.sh | sudo sh 4 | 5 | # Remount root as writable 6 | sudo mount -o remount,rw / 7 | 8 | sudo touch /tmp/tmpUpdatePath.log; 9 | sudo chmod 777 /tmp/tmpUpdatePath.log; 10 | 11 | languageConfig="/var/www/dashboard/config/language.php"; 12 | if [ -f ${languageConfig} ]; then 13 | sudo sed -i "/\$pistarLanguage=/d" ${languageConfig} 14 | # Add English Language 15 | sudo sed -i "/include_once/ i\$pistarLanguage=\'chinese_cn\';" ${languageConfig} 16 | cat ${languageConfig} 17 | fi 18 | 19 | echo "完成,刷新生效!Done, refresh to use " -------------------------------------------------------------------------------- /extra-updateScripts/Patch_Set_EN_LanguageAndTimeZone.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # sudo curl https://www.bi7jta.cn/files/AndyTaylorTweet/updateScripts/Patch_Set_EN_LanguageAndTimeZone.sh | sudo sh 4 | 5 | # Remount root as writable 6 | sudo mount -o remount,rw / 7 | 8 | sudo touch /tmp/tmpUpdatePath.log; 9 | sudo chmod 777 /tmp/tmpUpdatePath.log; 10 | 11 | languageConfig="/var/www/dashboard/config/language.php"; 12 | if [ -f ${languageConfig} ]; then 13 | sudo sed -i "/\$pistarLanguage=/d" ${languageConfig} 14 | # Add English Language 15 | sudo sed -i "/include_once/ i\$pistarLanguage=\'english_us\';" ${languageConfig} 16 | cat ${languageConfig} 17 | fi 18 | 19 | echo "完成,刷新生效!Done, refresh to use " -------------------------------------------------------------------------------- /extra-updateScripts/Patch_Support_HDMI_1080p_FullScrean_BPiM2.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Fix the RPi4B output 1080p not full screen 3 | # sudo curl https://www.bi7jta.cn/files/AndyTaylorTweet/updateScripts/Patch_Support_HDMI_1080p_FullScrean_BPiM2.sh | sudo sh 4 | 5 | # Remount root as writable 6 | sudo mount -o remount,rw / 7 | sudo mount -o remount,rw /boot 8 | 9 | # 前提,先安装桌面组件,刷桌面版pi BPiM2 BPiM2u, 树莓派版J-STAR V2.3 刷卡已经支持 10 | # 替换开机检测分辨率, 11 | sudo sed -i "s#\#hdmi_force_hotplug=1#hdmi_force_hotplug=1#g" /boot/config.txt 12 | sudo sed -i "s#\#hdmi_group=1#hdmi_group=2#g" /boot/config.txt 13 | sudo sed -i "s#\#hdmi_mode=1#hdmi_mode=82#g" /boot/config.txt 14 | cat /boot/config.txt 15 | 16 | # 删除以支持重复执行 17 | sudo sed -i "/@xrandr -s 1920x1080/d" /etc/xdg/lxsession/LXDE-pi/autostart 18 | sudo sed -i '$a@xrandr -s 1920x1080' /etc/xdg/lxsession/LXDE-pi/autostart 19 | cat /etc/xdg/lxsession/LXDE-pi/autostart 20 | 21 | # 删除重复的项 22 | sudo sed -i "/@xset/d" /home/pi/.config/lxsession/LXDE-pi/autostart 23 | # 重新添加 24 | sudo sed -i '$a@xset s off' /home/pi/.config/lxsession/LXDE-pi/autostart 25 | sudo sed -i '$a@xset s noblank' /home/pi/.config/lxsession/LXDE-pi/autostart 26 | sudo sed -i '$a@xset -dpms' /home/pi/.config/lxsession/LXDE-pi/autostart 27 | 28 | # 删除重复的项 29 | sudo sed -i "/@chromium-browser/d" /home/pi/.config/lxsession/LXDE-pi/autostart 30 | # 重新添加 31 | sudo sed -i '$a@chromium-browser --noerrdialogs --start-fullscreen --incognito http://localhost' /home/pi/.config/lxsession/LXDE-pi/autostart 32 | 33 | sudo sed -i "/@xrandr -s 1920x1080/d" /home/pi/.config/lxsession/LXDE-pi/autostart 34 | sudo sed -i '$a@xrandr -s 1920x1080' /home/pi/.config/lxsession/LXDE-pi/autostart 35 | cat /home/pi/.config/lxsession/LXDE-pi/autostart 36 | 37 | echo "完成,重启生效!Done, Reboot to use " -------------------------------------------------------------------------------- /extra-updateScripts/Patch_Support_HDMI_1080p_FullScrean_RPi4B.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Fix the RPi4B output 1080p not full screen 3 | # sudo curl https://www.bi7jta.cn/files/AndyTaylorTweet/updateScripts/Patch_Support_HDMI_1080p_FullScrean_RPi4B.sh | sudo sh 4 | 5 | # Remount root as writable 6 | sudo mount -o remount,rw / 7 | sudo mount -o remount,rw /boot 8 | 9 | # 前提,先安装桌面组件,刷桌面版pi-star 10 | # 替换开机检测分辨率, 11 | sudo sed -i "s#\#hdmi_force_hotplug=1#hdmi_force_hotplug=1#g" /boot/config.txt 12 | sudo sed -i "s#\#hdmi_group=1#hdmi_group=2#g" /boot/config.txt 13 | sudo sed -i "s#\#hdmi_mode=1#hdmi_mode=82#g" /boot/config.txt 14 | cat /boot/config.txt 15 | 16 | # 删除以支持重复执行 17 | sudo sed -i "/@xrandr -s 1920x1080/d" /etc/xdg/lxsession/LXDE-pi/autostart 18 | sudo sed -i '$a@xrandr -s 1920x1080' /etc/xdg/lxsession/LXDE-pi/autostart 19 | cat /etc/xdg/lxsession/LXDE-pi/autostart 20 | 21 | sudo sed -i "/@xrandr -s 1920x1080/d" /home/pi-star/.config/lxsession/LXDE-pi/autostart 22 | sudo sed -i '$a@xrandr -s 1920x1080' /home/pi-star/.config/lxsession/LXDE-pi/autostart 23 | cat /home/pi-star/.config/lxsession/LXDE-pi/autostart 24 | 25 | echo "完成,重启生效!Done, Reboot to use " -------------------------------------------------------------------------------- /extra-updateScripts/Patch_Support_HDMI_1080p_FullScrean_RPi4B_BD7EM.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Fix the RPi4B output 1080p not full screen 3 | # sudo curl https://www.bi7jta.cn/files/AndyTaylorTweet/updateScripts/Patch_Support_HDMI_1080p_FullScrean_RPi4B.sh | sudo sh 4 | 5 | # Remount root as writable 6 | sudo mount -o remount,rw / 7 | sudo mount -o remount,rw /boot 8 | 9 | # 前提,先安装桌面组件,刷桌面版pi-star 10 | # 替换开机检测分辨率, 11 | sudo sed -i "s#\#hdmi_force_hotplug=1#hdmi_force_hotplug=1#g" /boot/config.txt 12 | sudo sed -i "s#\#hdmi_group=1#hdmi_group=2#g" /boot/config.txt 13 | sudo sed -i "s#\#hdmi_mode=1#hdmi_mode=82#g" /boot/config.txt 14 | cat /boot/config.txt 15 | 16 | # 删除以支持重复执行 17 | sudo sed -i "/@xrandr -s 1920x1080/d" /etc/xdg/lxsession/LXDE-pi/autostart 18 | sudo sed -i '$a@xrandr -s 1920x1080' /etc/xdg/lxsession/LXDE-pi/autostart 19 | cat /etc/xdg/lxsession/LXDE-pi/autostart 20 | 21 | # 删除重复的项 22 | sudo sed -i "/@xset/d" /home/pi-star/.config/lxsession/LXDE-pi/autostart 23 | # 重新添加 24 | sudo sed -i '$a@xset s off' /home/pi-star/.config/lxsession/LXDE-pi/autostart 25 | sudo sed -i '$a@xset s noblank' /home/pi-star/.config/lxsession/LXDE-pi/autostart 26 | sudo sed -i '$a@xset -dpms' /home/pi-star/.config/lxsession/LXDE-pi/autostart 27 | 28 | # 删除重复的项 29 | sudo sed -i "/@chromium-browser/d" /home/pi-star/.config/lxsession/LXDE-pi/autostart 30 | # 重新添加 31 | sudo sed -i '$a@chromium-browser --noerrdialogs --start-fullscreen --incognito http://localhost' /home/pi-star/.config/lxsession/LXDE-pi/autostart 32 | 33 | sudo sed -i "/@xrandr -s 1920x1080/d" /home/pi-star/.config/lxsession/LXDE-pi/autostart 34 | sudo sed -i '$a@xrandr -s 1920x1080' /home/pi-star/.config/lxsession/LXDE-pi/autostart 35 | cat /home/pi-star/.config/lxsession/LXDE-pi/autostart 36 | 37 | echo "完成,重启生效!Done, Reboot to use " 38 | echo "注意:对于RPi4B 双HDMI接口,此修改只对=====HDMI0====,即靠近TypeC USB的接口有效,=====HDMI1====后续完善 " -------------------------------------------------------------------------------- /extra-updateScripts/Patch_Support_RPi5B.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Patch_Support_RPi5B 3 | # sudo curl https://www.bi7jta.cn/files/AndyTaylorTweet/updateScripts/Patch_Support_RPi5B.sh | sudo sh 4 | 5 | # Remount root as writable 6 | sudo mount -o remount,rw / 7 | sudo mount -o remount,rw /boot 8 | 9 | sudo touch /tmp/tmpUpdatePath.log; 10 | sudo chmod 777 /tmp/tmpUpdatePath.log; 11 | 12 | autostartConfig="/boot/config.txt"; 13 | if [ -f ${autostartConfig} ]; then 14 | sudo sed -i "/set\ os_check=0/d" ${autostartConfig} 15 | sudo sed -i "/os_check=0/d" ${autostartConfig} 16 | sudo sed -i '$aos_check=0' ${autostartConfig} 17 | 18 | cat ${autostartConfig} 19 | fi 20 | 21 | echo "完成,将卡放到5B使用!Done" -------------------------------------------------------------------------------- /extra-updateScripts/Patch_ZeroW_Open_CallerDetails.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Add_BPiM2_HDMI_Chrome_AutoStart 3 | # sudo curl https://www.bi7jta.cn/files/AndyTaylorTweet/updateScripts/Patch_ZeroW_Open_CallerDetails.sh | sudo sh 4 | 5 | # Remount root as writable 6 | sudo mount -o remount,rw / 7 | 8 | sudo touch /tmp/tmpUpdatePath.log; 9 | sudo chmod 777 /tmp/tmpUpdatePath.log; 10 | 11 | autostartConfig="/etc/pistar-release"; 12 | FIND_STR="ProcNum" 13 | #If NOT exist , add it 14 | if [ `grep -c "$FIND_STR" $autostartConfig` -ne '0' ];then 15 | echo "Char ${FIND_STR} exist " 16 | else 17 | echo "Char ${FIND_STR} NOT exist ,and this Attribute/Segment " 18 | echo "ProcNum = 1" >> ${autostartConfig} 19 | fi 20 | 21 | #If ZeroW 1 core, crack it to 4 core 22 | if [ -f ${autostartConfig} ]; then 23 | sudo sed -i "s#\#ProcNum\ =\ 4#g" ${autostartConfig} 24 | cat ${autostartConfig} 25 | fi 26 | 27 | echo "完成,刷新生效!Done, refresh to use " -------------------------------------------------------------------------------- /extra-updateScripts/Recover-Gitee-to-3.4.17-github.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # sudo curl https://www.bi7jta.cn/files/AndyTaylorTweet/updateScripts/Recover-Gitee-to-3.4.17-github.sh | sudo sh 3 | 4 | git_update() { 5 | # Set the function variables 6 | gitFolder=${1} 7 | git --work-tree=${gitFolder} --git-dir=${gitFolder}/.git reset --hard && git --work-tree=${gitFolder} --git-dir=${gitFolder}/.git clean -f #使本地完全回退到上次 commit 8 | # Git-忽略冲突,强制更新代码并覆盖本地代码 9 | git --work-tree=${gitFolder} --git-dir=${gitFolder}/.git fetch --all 10 | # Reset local modified, 11 | git --work-tree=${gitFolder} --git-dir=${gitFolder}/.git reset --hard origin/master 12 | # Pull new updated, 13 | git --work-tree=${gitFolder} --git-dir=${gitFolder}/.git pull -q origin master 14 | } 15 | 16 | if [ "$(id -u)" != "0" ]; then 17 | echo -e "You need to be root to run this command...\n" 18 | exit 1 19 | fi 20 | 21 | # 恢复到V3 22 | FIND_FILE="/etc/pistar-release" 23 | FIND_STR="Version = 3" 24 | 25 | if [ `grep -c "$FIND_STR" $FIND_FILE` -ne '0' ];then 26 | echo "Pi-Star V3, revover it" 27 | else 28 | echo "监测到你正在使用的是Pi-StarV4版本,不支持恢复到v3版本" 29 | cat ${FIND_FILE} 30 | exit 1 31 | fi 32 | 33 | cd /home/pi-star; 34 | sudo mount -o remount,rw / 35 | 36 | echo '更新更新服务器地址为国内, 务必增加sudo'; 37 | # TODO 需要处理异常 38 | 39 | sudo sed -i "s#https://gitee.com/BI7JTA/BI7JTA-PiStar-bin_RPi4B.git#https://github.com/AndyTaylorTweet/Pi-Star_Binaries.git#g" /usr/local/bin/.git/config #3.4.17版本不支持更新 40 | 41 | echo 'bin源:'; 42 | cat /usr/local/bin/.git/config; 43 | 44 | echo "Updating /usr/local/bin ..." 45 | git_update /usr/local/bin 46 | echo "Done!\n" 47 | 48 | sudo sed -i "s#https://gitee.com/BI7JTA/W0CHP-PiStar-sbin_BPiM2.git#https://github.com/AndyTaylorTweet/Pi-Star_Binaries_sbin.git#g" /usr/local/sbin/.git/config 49 | echo 'sbin源:' 50 | cat /usr/local/sbin/.git/config; 51 | 52 | echo "Updating /usr/local/sbin ..." 53 | git_update /usr/local/sbin 54 | echo "Done!\n" 55 | 56 | sudo sed -i "s#https://gitee.com/BI7JTA/W0CHP-PiStar-Dash_BPiM2.git#https://github.com/AndyTaylorTweet/Pi-Star_DV_Dash.git#g" /var/www/dashboard/.git/config 57 | echo 'dashboard源:' 58 | cat /var/www/dashboard/.git/config; 59 | 60 | 61 | echo "Updating /var/www/dashboard ..." 62 | git_update /var/www/dashboard 63 | echo "Done!\n" 64 | 65 | 66 | echo "All Done"; 67 | -------------------------------------------------------------------------------- /extra-updateScripts/Recovery-Github-from-Gitee.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # sudo curl https://www.bi7jta.cn/files/AndyTaylorTweet/updateScripts/Recovery-Github-from-Gitee.sh | sudo sh 3 | if [ "$(id -u)" != "0" ]; then 4 | echo -e "You need to be root to run this command...\n" 5 | exit 1 6 | fi 7 | 8 | cd /home/pi-star; 9 | 10 | sudo mount -o remount,rw / 11 | sudo sed -i "s#mirrors.tuna.tsinghua.edu.cn#raspbian.raspberrypi.org#g" /etc/apt/sources.list 12 | 13 | echo 'apt-get源:' 14 | cat /etc/apt/sources.list 15 | 16 | sudo sed -i "s#mirrors.tuna.tsinghua.edu.cn#archive.raspberrypi.org#g" /etc/apt/sources.list.d/raspi.list 17 | echo 'raspi.list源:' 18 | cat /etc/apt/sources.list.d/raspi.list 19 | 20 | echo '更新更新服务器地址为国内, 务必增加sudo'; 21 | # TODO 需要处理异常 22 | 23 | # 首先处理最原始的库为github的,只针对树莓派4桌面版,其它的不处理,处理完后,与W0CHP库没有关系了 24 | sudo sed -i "s#https://repo.w0chp.net/WPSD-Dev/W0CHP-PiStar-bin.git#https://github.com/bi7jta/BI7JTA-PiStar-bin_RPi4B.git#g" /usr/local/bin/.git/config 25 | sudo sed -i "s#https://gitee.com/BI7JTA/BI7JTA-PiStar-bin_RPi4B.git#https://github.com/bi7jta/BI7JTA-PiStar-bin_RPi4B.git#g" /usr/local/bin/.git/config 26 | 27 | # 这里是处理BPiM2的 # BPi-M2专用 28 | sudo sed -i "s#https://gitee.com/BI7JTA/W0CHP-PiStar-bin_BPiM2.git#https://github.com/bi7jta/W0CHP-PiStar-bin_BPiM2.git#g" /usr/local/bin/.git/config 29 | echo 'bin源:'; 30 | cat /usr/local/bin/.git/config; 31 | 32 | sudo sed -i "s#https://repo.w0chp.net/WPSD-Dev/W0CHP-PiStar-sbin.git#https://github.com/bi7jta/W0CHP-PiStar-sbin_BPiM2.git#g" /usr/local/sbin/.git/config 33 | sudo sed -i "s#https://gitee.com/BI7JTA/W0CHP-PiStar-sbin_BPiM2.git#https://github.com/bi7jta/W0CHP-PiStar-sbin_BPiM2.git#g" /usr/local/sbin/.git/config 34 | echo 'sbin源:' 35 | cat /usr/local/sbin/.git/config; 36 | 37 | sudo sed -i "s#https://repo.w0chp.net/WPSD-Dev/W0CHP-PiStar-Dash.git#https://github.com/bi7jta/W0CHP-PiStar-Dash_BPiM2.git#g" /var/www/dashboard/.git/config 38 | sudo sed -i "s#https://gitee.com/BI7JTA/W0CHP-PiStar-Dash_BPiM2.git#https://github.com/bi7jta/W0CHP-PiStar-Dash_BPiM2.git#g" /var/www/dashboard/.git/config 39 | echo 'dashboard源:' 40 | cat /var/www/dashboard/.git/config; 41 | 42 | 43 | echo "Done"; 44 | -------------------------------------------------------------------------------- /extra-updateScripts/Recovery-MW0MWZ-Bin-Github-And-Hard-update-bin.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # sudo curl https://www.bi7jta.cn/files/AndyTaylorTweet/updateScripts/Recovery-MW0MWZ-Bin-Github-And-Hard-update-bin.sh | sudo sh 3 | 4 | git_update() { 5 | # Set the function variables 6 | gitFolder=${1} 7 | git --work-tree=${gitFolder} --git-dir=${gitFolder}/.git reset --hard && git --work-tree=${gitFolder} --git-dir=${gitFolder}/.git clean -f #使本地完全回退到上次 commit 8 | # Git-忽略冲突,强制更新代码并覆盖本地代码 9 | git --work-tree=${gitFolder} --git-dir=${gitFolder}/.git fetch --all 10 | # Reset local modified, 11 | git --work-tree=${gitFolder} --git-dir=${gitFolder}/.git reset --hard origin/master 12 | # Pull new updated, 13 | git --work-tree=${gitFolder} --git-dir=${gitFolder}/.git pull -q origin master 14 | } 15 | 16 | if [ "$(id -u)" != "0" ]; then 17 | echo -e "You need to be root to run this command...\n" 18 | exit 1 19 | fi 20 | 21 | sudo mount -o remount,rw / 22 | 23 | sudo systemctl stop pistar-watchdog.timer 24 | sudo systemctl stop pistar-watchdog.service 25 | sudo systemctl stop mmdvmhost.timer 26 | sudo systemctl stop mmdvmhost.service 27 | 28 | # BIN二进制程序 29 | sudo sed -i "s#https://gitee.com/BI7JTA/Pi-Star_v4_Binaries_Bin.git#https://github.com/AndyTaylorTweet/Pi-Star_v4_Binaries_Bin.git#g" /usr/local/bin/.git/config # 这里处理MW0MWZ版本V4的bin项目 30 | 31 | echo 'bin源:'; 32 | cat /usr/local/bin/.git/config; 33 | 34 | echo "Updating /usr/local/bin ..." 35 | git_update /usr/local/bin 36 | echo "Done!\n" 37 | 38 | sudo systemctl start pistar-watchdog.timer 39 | sudo systemctl start pistar-watchdog.service 40 | sudo systemctl start mmdvmhost.timer 41 | sudo systemctl start mmdvmhost.service 42 | 43 | echo "All Done"; 44 | -------------------------------------------------------------------------------- /extra-updateScripts/Recovery-MW0MWZ-Bin-github-to-gitee-V3F4-And-Hard-update-bin.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # to https://gitee.com/BI7JTA/Pi-Star_v4_Binaries_Bin.git 3 | # sudo curl https://www.bi7jta.cn/files/AndyTaylorTweet/updateScripts/Recovery-MW0MWZ-Bin-github-to-gitee-V3F4-And-Hard-update-bin.sh | sudo sh 4 | 5 | git_update() { 6 | # Set the function variables 7 | gitFolder=${1} 8 | git --work-tree=${gitFolder} --git-dir=${gitFolder}/.git reset --hard && git --work-tree=${gitFolder} --git-dir=${gitFolder}/.git clean -f #使本地完全回退到上次 commit 9 | # Git-忽略冲突,强制更新代码并覆盖本地代码 10 | git --work-tree=${gitFolder} --git-dir=${gitFolder}/.git fetch --all 11 | # Reset local modified, 12 | git --work-tree=${gitFolder} --git-dir=${gitFolder}/.git reset --hard origin/master 13 | # Pull new updated, 14 | git --work-tree=${gitFolder} --git-dir=${gitFolder}/.git pull -q origin master 15 | } 16 | 17 | if [ "$(id -u)" != "0" ]; then 18 | echo -e "You need to be root to run this command...\n" 19 | exit 1 20 | fi 21 | 22 | sudo mount -o remount,rw / 23 | 24 | sudo systemctl stop pistar-watchdog.timer 25 | sudo systemctl stop pistar-watchdog.service 26 | sudo systemctl stop mmdvmhost.timer 27 | sudo systemctl stop mmdvmhost.service 28 | 29 | # BIN二进制程序 30 | sudo sed -i "s#https://gitee.com/BI7JTA/Pi-Star_v4_2_0_Binaries_Bin.git#https://gitee.com/BI7JTA/Pi-Star_v4_Binaries_Bin.git#g" /usr/local/bin/.git/config # 这里处理MW0MWZ版本V4的bin项目 31 | 32 | echo 'bin源:'; 33 | cat /usr/local/bin/.git/config; 34 | 35 | echo "Updating /usr/local/bin ..." 36 | git_update /usr/local/bin 37 | echo "Done!\n" 38 | 39 | sudo systemctl start pistar-watchdog.timer 40 | sudo systemctl start pistar-watchdog.service 41 | sudo systemctl start mmdvmhost.timer 42 | sudo systemctl start mmdvmhost.service 43 | 44 | echo "All Done"; 45 | -------------------------------------------------------------------------------- /extra-updateScripts/Recovery-apt-list-from-tsinghua.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # sudo curl https://www.bi7jta.cn/files/AndyTaylorTweet/updateScripts/Recovery-apt-list-from-tsinghua.sh | sudo sh 3 | if [ "$(id -u)" != "0" ]; then 4 | echo -e "You need to be root to run this command...\n" 5 | exit 1 6 | fi 7 | 8 | sudo mount -o remount,rw / 9 | sudo sed -i "s#mirrors.tuna.tsinghua.edu.cn#raspbian.raspberrypi.org#g" /etc/apt/sources.list 10 | # 删除-src提升速度 11 | sudo sed -i "/deb-src/d" /etc/apt/sources.list 12 | 13 | echo 'apt-get源:' 14 | cat /etc/apt/sources.list 15 | 16 | sudo sed -i "s#mirrors.tuna.tsinghua.edu.cn#archive.raspberrypi.org#g" /etc/apt/sources.list.d/raspi.list 17 | # 删除-src提升速度 18 | sudo sed -i "/deb-src/d" /etc/apt/sources.list.d/raspi.list 19 | 20 | echo 'raspi.list源:' 21 | cat /etc/apt/sources.list.d/raspi.list 22 | 23 | echo "Done"; 24 | -------------------------------------------------------------------------------- /extra-updateScripts/Remove_NextionDriver.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | ## sudo curl https://www.bi7jta.cn/files/AndyTaylorTweet/updateScripts/Remove_NextionDriver.sh | sudo sh 4 | 5 | main_function() { 6 | mount -o remount,rw / 7 | systemctl stop dmrgateway.timer; 8 | systemctl stop dmrgateway; 9 | systemctl stop mmdvmhost; 10 | systemctl stop nextiondriver; 11 | sudo systemctl disable nextiondriver; 12 | sudo systemctl unmask nextiondriver; 13 | 14 | service_file="/lib/systemd/system/nextiondriver.service" 15 | 16 | # 检查文件是否存在 17 | if [ -f "$service_file" ]; then 18 | echo "Delete file ${service_file} ." 19 | sudo rm ${service_file}; 20 | fi 21 | 22 | rm /usr/local/bin/NextionDriver; 23 | sudo rm /etc/mmdvmhost.old; 24 | rm /etc/mmdvmhost.old; 25 | 26 | file_path=/etc/mmdvmhost 27 | # 多行替换 [Transparent Data] 部分的 Enable=1 为0 28 | sed -i '/\[Transparent Data\]/{:a;N;/Enable=1/!ba;s/Enable=1/Enable=0/}' "$file_path" 29 | sed -i '/\[Nextion\]/{:a;N;/Port=\/dev\/ttyNextionDriver/!ba;s/Port=\/dev\/ttyNextionDriver/Port=modem/}' "$file_path" 30 | cat /etc/mmdvmhost 31 | 32 | # 清除残留 33 | sed -i "s#\[NextionDriver\]#\[DelNextionDriver\]#g" "$file_path" 34 | 35 | # 删除依赖 36 | sudo sed -i "/nextiondriver/d" /lib/systemd/system/mmdvmhost.service; 37 | systemctl daemon-reload; 38 | systemctl start mmdvmhost; 39 | systemctl start dmrgateway; 40 | systemctl start dmrgateway.timer; 41 | 42 | cat /lib/systemd/system/mmdvmhost.service 43 | echo "Done Remove NextionDriver!" 44 | echo "卸载完成,如需重新安装,可以进入安装界面继续!" 45 | } 46 | 47 | if [ -t 1 ]; then 48 | # run via terminal, only output to screen 49 | main_function 50 | else 51 | # if not run via terminal, log everything into a log file 52 | main_function >> /var/log/pi-star/UnInstallNextionDriver.log 2>&1 53 | fi 54 | 55 | 56 | -------------------------------------------------------------------------------- /extra-updateScripts/Setup-pistar-watchdog-WiFi-Keep-Alive.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | ## Keep the BPiM2 betty WiFI not down 3 | ## sudo curl https://www.bi7jta.cn/files/AndyTaylorTweet/updateScripts/Setup-pistar-watchdog-WiFi-Keep-Alive.sh | sudo sh 4 | 5 | echo "Not need again after BPiM2 upgrade to buster, please flash the new IMG" 6 | echo "Visit https://github.com/JTA-STAR/J-STAR" 7 | sudo sed -i "/\/usr\/local\/sbin\/pistar-watchdog-WiFi-Keep-Alive.sh/d" /etc/rc.local; 8 | cat /etc/rc.local 9 | exit 1 10 | 11 | CURTIME=`date "+%Y-%m-%d %H:%M:%S"` 12 | echo "$CURTIME: Add sctipt to /etc/rc.local nohup /usr/local/sbin/pistar-watchdog-WiFi-Keep-Alive.sh & " >> /var/log/pi-star/pistar-watchdog-WiFi-Keep-Alive.log 13 | 14 | # Delete exist script 15 | sudo sed -i "/\/usr\/local\/sbin\/pistar-watchdog-WiFi-Keep-Alive.sh/d" /etc/rc.local; 16 | 17 | # Obtain promise 18 | sudo sed -i '/exit/ i\chmod +x /usr/local/sbin/pistar-watchdog-WiFi-Keep-Alive.sh' /etc/rc.local 19 | 20 | # Add watchdog script to bootup 21 | sudo sed -i '/exit/ i\nohup /usr/local/sbin/pistar-watchdog-WiFi-Keep-Alive.sh &' /etc/rc.local 22 | 23 | CURTIME=`date "+%Y-%m-%d %H:%M:%S"` 24 | echo "$CURTIME: Add sctipt to /etc/rc.local done! " >> /var/log/pi-star/pistar-watchdog-WiFi-Keep-Alive.log 25 | echo "完成,重启生效!" -------------------------------------------------------------------------------- /extra-updateScripts/Setup-pistar-watchdog-WiFi-Keep-Alive_NEO.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | ## Keep the NEO WiFI not down 3 | ## sudo curl https://www.bi7jta.cn/files/AndyTaylorTweet/updateScripts/Setup-pistar-watchdog-WiFi-Keep-Alive_NEO.sh | sudo sh 4 | 5 | echo "Not need again after BPiM2 upgrade to buster, please flash the new IMG" 6 | echo "Visit https://github.com/JTA-STAR/J-STAR" 7 | sudo sed -i "/\/home\/pi-star\/pistar-watchdog-WiFi-Keep-Alive_NEO.sh/d" /etc/rc.local; 8 | cat /etc/rc.local 9 | exit 1 10 | 11 | CURTIME=`date "+%Y-%m-%d %H:%M:%S"` 12 | echo "$CURTIME: Add sctipt to /etc/rc.local nohup /home/pi-star/pistar-watchdog-WiFi-Keep-Alive_NEO.sh & " >> /var/log/pi-star/pistar-watchdog-WiFi-Keep-Alive_NEO.log 13 | 14 | rpi-rw; 15 | cd /home/pi-star 16 | rm -rf pistar-watchdog-WiFi-Keep-Alive_NEO.sh 17 | remoteExecuteFile="https://www.bi7jta.cn/files/AndyTaylorTweet/updateScripts/pistar-watchdog-WiFi-Keep-Alive_NEO.sh" 18 | 19 | echo "Downloading file ${remoteExecuteFile}" >> /var/log/pi-star/pistar-watchdog-WiFi-Keep-Alive_NEO.log 20 | sudo curl -OL ${remoteExecuteFile}; 21 | 22 | # Delete exist script 23 | sudo sed -i "/\/home\/pi-star\/pistar-watchdog-WiFi-Keep-Alive_NEO.sh/d" /etc/rc.local; 24 | 25 | # Obtain promise 26 | sudo sed -i '/exit/ i\chmod +x /home/pi-star/pistar-watchdog-WiFi-Keep-Alive_NEO.sh' /etc/rc.local 27 | 28 | # Add watchdog script to bootup 29 | sudo sed -i '/exit/ i\nohup /home/pi-star/pistar-watchdog-WiFi-Keep-Alive_NEO.sh &' /etc/rc.local 30 | 31 | CURTIME=`date "+%Y-%m-%d %H:%M:%S"` 32 | echo "$CURTIME: Add sctipt to /etc/rc.local done! " >> /var/log/pi-star/pistar-watchdog-WiFi-Keep-Alive_NEO.log 33 | echo "完成,重启生效!Done, Reboot to use " -------------------------------------------------------------------------------- /extra-updateScripts/Update-Pi-Star-OS-Ignore-Local-Changed.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | ############################################################################### 4 | # 5 | # How to run this script? 6 | # http://pi-star:4200 7 | # https://pi-star:4200 8 | # Mourse right click Copy and Paste 9 | # curl -Ls https://www.bi7jta.cn/files/AndyTaylorTweet/updateScripts/Update-Pi-Star-OS-Ignore-Local-Changed.sh | sudo bash 10 | # 11 | # by @BI7JTA 12 | # 13 | ############################################################################### 14 | # 15 | if [ "$(id -u)" != "0" ]; then 16 | echo -e "You need to be root to run this command...\n" 17 | exit 1 18 | fi 19 | 20 | TICK="[✓]" 21 | INFO="[i]" 22 | 23 | mount -o remount,rw / # for shits and giggles 24 | 25 | 26 | git_update() { 27 | # Set the function variables 28 | gitFolder=${1} 29 | # get proper W0CHP dash branch user is running... 30 | dash_branch="$( git --git-dir=${gitFolder}/.git branch | grep '*' | awk {'print $2'} )" 31 | 32 | #Git-忽略冲突,强制更新代码并覆盖本地代码 33 | git --work-tree=${gitFolder} --git-dir=${gitFolder}/.git reset --hard && git --work-tree=${gitFolder} --git-dir=${gitFolder}/.git clean -f #使本地完全回退到上次 commit 34 | git --work-tree=${gitFolder} --git-dir=${gitFolder}/.git fetch --all 35 | # Reset local modified, 36 | git --work-tree=${gitFolder} --git-dir=${gitFolder}/.git reset --hard origin/master 37 | # Pull new updated, 38 | git --work-tree=${gitFolder} --git-dir=${gitFolder}/.git pull -q origin master 39 | } 40 | 41 | main_function() { 42 | 43 | # Make the disk writable and stop cron to prevent it from making it R/O 44 | systemctl stop cron.service > /dev/null 2<&1 45 | pkill pistar-hourly.cron > /dev/null 2>&1 46 | pkill pistar-daily.cron > /dev/null 2>&1 47 | 48 | 49 | echo "Stopping Services..." 50 | pistar-services fullstop > /dev/null 2>&1 51 | echo -e "${TICK} Done!\n" 52 | 53 | # ensure FS is RW 54 | touch /root/.WPSD-updating > /dev/null 2>&1 55 | if [ ! -f /root/.WPSD-updating ] ; then 56 | touch /root/.WPSD-updating > /dev/null 2>&1 57 | if [ ! -f /root/.WPSD-updating ] ; then 58 | echo -e "Filesystem could not enter R/W mode...please try updating again.\n" 59 | exit 1 60 | fi 61 | fi 62 | 63 | echo "Updating W0CHP-PiStar-Dash Scripts and Support Programs..." 64 | git_update /usr/local/sbin 65 | #systemctl daemon-reload > /dev/null 2>&1 66 | echo -e "${TICK} Done!\n" 67 | 68 | echo "Updating W0CHP-PiStar-Dash Digital Voice and Related Binaries..." 69 | git_update /usr/local/bin 70 | echo -e "${TICK} Done!\n" 71 | 72 | echo "Updating W0CHP-PiStar-Dash Web Dashboard Software..." 73 | git_update /var/www/dashboard 74 | echo -e "${TICK} Done!\n" 75 | 76 | 77 | echo "Starting Services..." 78 | pistar-services start > /dev/null 2>&1 79 | echo -e "${TICK} Done!\n" 80 | 81 | echo "Updates complete, syncing disk cache..." 82 | rm /root/.WPSD-updating > /dev/null 2>&1 83 | /bin/sync 84 | /bin/sync 85 | /bin/sync 86 | systemctl start cron.service > /dev/null 2<&1 87 | echo -e "${TICK} Update Process Finished!" 88 | 89 | echo "update done! " 90 | } 91 | 92 | if [ -t 1 ]; then 93 | # run via terminal, only output to screen 94 | main_function 95 | else 96 | # if not run via terminal, log everything into a log file 97 | # echo "Execute /usr/local/sbin/Update-Pi-Star-OS-Ignore-Local-Changed.sh" >> /var/log/pi-star/pi-star_update.log 2>&1 98 | main_function #>> /var/log/pi-star/pi-star_update.log 2>&1 99 | fi 100 | 101 | 102 | exit 0 -------------------------------------------------------------------------------- /extra-updateScripts/Update-Pi-Star-OS.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # 调用目标主机,执行系统更新命令:sudo pistar-update 4 | 5 | # sudo curl https://www.bi7jta.cn/files/AndyTaylorTweet/updateScripts/Update-Pi-Star-OS.sh | sudo sh 6 | 7 | if [ "$(id -u)" != "0" ]; then 8 | echo -e "You need to be root to run this command...\n" 9 | exit 1 10 | fi 11 | 12 | sudo cp /usr/local/sbin/pistar-update /usr/local/sbin/pistar-update.remote_update; 13 | sudo sed -i "/apt-get update/d" /usr/local/sbin/pistar-update.remote_update; 14 | sudo sed -i "/apt-get upgrade/d" /usr/local/sbin/pistar-update.remote_update; 15 | sudo sed -i "/apt-get clean/d" /usr/local/sbin/pistar-update.remote_update; 16 | sudo mount -o remount,rw /; 17 | sudo /usr/local/sbin/pistar-update.remote_update; -------------------------------------------------------------------------------- /extra-updateScripts/_delPatch_Add_HDMI_Chrome_Full.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Add_BPiM2_HDMI_Chrome_AutoStart 3 | # sudo curl https://www.bi7jta.cn/files/AndyTaylorTweet/updateScripts/Patch_Add_HDMI_Chrome_Full.sh | sudo sh 4 | 5 | # Remount root as writable 6 | sudo mount -o remount,rw / 7 | 8 | sudo touch /tmp/tmpUpdatePath.log; 9 | sudo chmod 777 /tmp/tmpUpdatePath.log; 10 | 11 | autostartConfig=""; 12 | if [ -f /home/pi/.config/lxsession/LXDE-pi/autostart ]; then #BPiM2 betty 13 | autostartConfig="/home/pi/.config/lxsession/LXDE-pi/autostart"; 14 | echo "Find BPiM2 betty config file in ${autostartConfig}" 15 | else if [ -f "/home/pi-star/.config/lxsession/LXDE-pi/autostart" ]; then #RPi4B Desktop 16 | autostartConfig="/home/pi-star/.config/lxsession/LXDE-pi/autostart"; 17 | echo "Find RPi4B Desktop config file in ${autostartConfig}" 18 | fi 19 | fi 20 | 21 | if [ autostartConfig != "" ]; then 22 | sudo sed -i "s#\#http:\/\/localhost#g" ${autostartConfig} > /tmp/tmpUpdatePath.log; 23 | cat ${autostartConfig} 24 | fi 25 | 26 | echo "完成,重启生效!Done, Reboot to use " -------------------------------------------------------------------------------- /extra-updateScripts/_delPatch_Add_HDMI_Chrome_Simple.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Add_BPiM2_HDMI_Chrome_AutoStart 3 | # sudo curl https://www.bi7jta.cn/files/AndyTaylorTweet/updateScripts/Patch_Add_HDMI_Chrome_Simple.sh | sudo sh 4 | 5 | # Remount root as writable 6 | sudo mount -o remount,rw / 7 | 8 | sudo touch /tmp/tmpUpdatePath.log; 9 | sudo chmod 777 /tmp/tmpUpdatePath.log; 10 | 11 | autostartConfig=""; 12 | if [ -f /home/pi/.config/lxsession/LXDE-pi/autostart ]; then #BPiM2 betty 13 | autostartConfig="/home/pi/.config/lxsession/LXDE-pi/autostart"; 14 | echo "Find BPiM2 betty config file in ${autostartConfig}" 15 | else if [ -f "/home/pi-star/.config/lxsession/LXDE-pi/autostart" ]; then #RPi4B Desktop 16 | autostartConfig="/home/pi-star/.config/lxsession/LXDE-pi/autostart"; 17 | echo "Find RPi4B Desktop config file in ${autostartConfig}" 18 | fi 19 | fi 20 | 21 | if [ autostartConfig != "" ]; then 22 | sudo sed -i "s#\#http:\/\/localhost\/simple#g" ${autostartConfig} > /tmp/tmpUpdatePath.log; 23 | cat ${autostartConfig} 24 | fi 25 | 26 | echo "完成,重启生效!Done, Reboot to use " -------------------------------------------------------------------------------- /extra-updateScripts/change-Github-to-Gitee.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # sudo curl https://www.bi7jta.cn/files/AndyTaylorTweet/updateScripts/change-Github-to-Gitee.sh | sudo sh 3 | if [ "$(id -u)" != "0" ]; then 4 | echo -e "You need to be root to run this command...\n" 5 | exit 1 6 | fi 7 | 8 | cd /home/pi-star; 9 | 10 | sudo mount -o remount,rw / 11 | sudo sed -i "s#raspbian.raspberrypi.org#mirrors.tuna.tsinghua.edu.cn#g" /etc/apt/sources.list 12 | 13 | echo 'apt-get源:' 14 | cat /etc/apt/sources.list 15 | 16 | sudo sed -i "s#archive.raspberrypi.org#mirrors.tuna.tsinghua.edu.cn#g" /etc/apt/sources.list.d/raspi.list 17 | echo 'raspi.list源:' 18 | cat /etc/apt/sources.list.d/raspi.list 19 | 20 | echo '更新更新服务器地址为国内, 务必增加sudo'; 21 | # TODO 需要处理异常 22 | # BPi-M2专用 23 | 24 | sudo sed -i "s#https://github.com/bi7jta/W0CHP-PiStar-bin_BPiM2.git#https://gitee.com/BI7JTA/W0CHP-PiStar-bin_BPiM2.git#g" /usr/local/bin/.git/config 25 | 26 | #W0CHP官方库专用 27 | sudo sed -i "s#https://repo.w0chp.net/Chipster/W0CHP-PiStar-bin.git#https://gitee.com/BI7JTA/W0CHP-PiStar-bin.git#g" /usr/local/bin/.git/config 28 | 29 | #Pi-Star4.x专用 30 | sudo sed -i "s#https://github.com/AndyTaylorTweet/Pi-Star_v4_Binaries_Bin.git#https://gitee.com/BI7JTA/Pi-Star_v4_Binaries_Bin.git#g" /usr/local/bin/.git/config 31 | 32 | echo 'bin源:'; 33 | cat /usr/local/bin/.git/config; 34 | 35 | sudo sed -i "s#https://github.com/bi7jta/W0CHP-PiStar-sbin_BPiM2.git#https://gitee.com/BI7JTA/W0CHP-PiStar-sbin_BPiM2.git#g" /usr/local/sbin/.git/config 36 | sudo sed -i "s#https://repo.w0chp.net/Chipster/W0CHP-PiStar-sbin.git#https://gitee.com/BI7JTA/W0CHP-PiStar-sbin.git#g" /usr/local/sbin/.git/config 37 | sudo sed -i "s#https://github.com/AndyTaylorTweet/Pi-Star_Binaries_sbin.git#https://gitee.com/BI7JTA/Pi-Star_Binaries_sbin.git#g" /usr/local/sbin/.git/config 38 | echo 'sbin源:' 39 | cat /usr/local/sbin/.git/config; 40 | 41 | 42 | sudo sed -i "s#https://github.com/bi7jta/W0CHP-PiStar-Dash_BPiM2.git#https://gitee.com/BI7JTA/W0CHP-PiStar-Dash_BPiM2.git#g" /var/www/dashboard/.git/config 43 | sudo sed -i "s#https://repo.w0chp.net/Chipster/W0CHP-PiStar-Dash.git#https://gitee.com/BI7JTA/W0CHP-PiStar-Dash.git#g" /var/www/dashboard/.git/config 44 | sudo sed -i "s#https://github.com/AndyTaylorTweet/Pi-Star_DV_Dash.git#https://gitee.com/BI7JTA/Pi-Star_DV_Dash.git#g" /var/www/dashboard/.git/config 45 | 46 | echo 'dashboard源:' 47 | cat /var/www/dashboard/.git/config; 48 | 49 | 50 | echo "Done"; 51 | -------------------------------------------------------------------------------- /extra-updateScripts/change-Github-to-Gitee2.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # sudo curl https://www.bi7jta.cn/files/AndyTaylorTweet/updateScripts/change-Github-to-Gitee.sh | sudo sh 4 | 5 | if [ "$(id -u)" != "0" ]; then 6 | echo -e "You need to be root to run this command...\n" 7 | exit 1 8 | fi 9 | 10 | cd /home/pi-star; 11 | 12 | sudo mount -o remount,rw / 13 | sudo sed -i "s#raspbian.raspberrypi.org#mirrors.tuna.tsinghua.edu.cn#g" /etc/apt/sources.list 14 | 15 | echo 'apt-get源:' 16 | cat /etc/apt/sources.list 17 | 18 | sudo sed -i "s#archive.raspberrypi.org#mirrors.tuna.tsinghua.edu.cn#g" /etc/apt/sources.list.d/raspi.list 19 | echo 'raspi.list源:' 20 | cat /etc/apt/sources.list.d/raspi.list 21 | 22 | echo '更新更新服务器地址为国内, 务必增加sudo'; 23 | # TODO 需要处理异常 24 | # BPi-M2专用 25 | 26 | sudo sed -i "s#https://github.com/bi7jta/W0CHP-PiStar-bin_BPiM2.git#https://gitee.com/BI7JTA/W0CHP-PiStar-bin_BPiM2.git#g" /usr/local/bin/.git/config 27 | 28 | #W0CHP官方库专用 29 | sudo sed -i "s#https://repo.w0chp.net/Chipster/W0CHP-PiStar-bin.git#https://gitee.com/BI7JTA/W0CHP-PiStar-bin.git#g" /usr/local/bin/.git/config 30 | 31 | #Pi-Star4.x专用 32 | sudo sed -i "s#https://github.com/AndyTaylorTweet/Pi-Star_v4_Binaries_Bin.git#https://gitee.com/BI7JTA/Pi-Star_v4_Binaries_Bin.git#g" /usr/local/bin/.git/config 33 | 34 | echo 'bin源:'; 35 | cat /usr/local/bin/.git/config; 36 | 37 | sudo sed -i "s#https://github.com/bi7jta/W0CHP-PiStar-sbin_BPiM2.git#https://gitee.com/BI7JTA/W0CHP-PiStar-sbin_BPiM2.git#g" /usr/local/sbin/.git/config 38 | sudo sed -i "s#https://repo.w0chp.net/Chipster/W0CHP-PiStar-sbin.git#https://gitee.com/BI7JTA/W0CHP-PiStar-sbin.git#g" /usr/local/sbin/.git/config 39 | sudo sed -i "s#https://github.com/AndyTaylorTweet/Pi-Star_Binaries_sbin.git#https://gitee.com/BI7JTA/Pi-Star_Binaries_sbin.git#g" /usr/local/sbin/.git/config 40 | echo 'sbin源:' 41 | cat /usr/local/sbin/.git/config; 42 | 43 | 44 | sudo sed -i "s#https://github.com/bi7jta/W0CHP-PiStar-Dash_BPiM2.git#https://gitee.com/BI7JTA/W0CHP-PiStar-Dash_BPiM2.git#g" /var/www/dashboard/.git/config 45 | sudo sed -i "s#https://repo.w0chp.net/Chipster/W0CHP-PiStar-Dash.git#https://gitee.com/BI7JTA/W0CHP-PiStar-Dash.git#g" /var/www/dashboard/.git/config 46 | sudo sed -i "s#https://github.com/AndyTaylorTweet/Pi-Star_DV_Dash.git#https://gitee.com/BI7JTA/Pi-Star_DV_Dash.git#g" /var/www/dashboard/.git/config 47 | 48 | echo 'dashboard源:' 49 | cat /var/www/dashboard/.git/config; 50 | 51 | 52 | echo "Done"; 53 | 54 | -------------------------------------------------------------------------------- /extra-updateScripts/patch/MW0MWZ/fulledit_mmdvmhost.inc: -------------------------------------------------------------------------------- 1 | 11 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | Pi-Star - Digital Voice Dashboard - Expert Editor 27 | 28 | 29 | 30 |
31 | 32 |
33 | 72 |
73 |
74 | 75 |
76 | 77 |
78 | 79 | 84 | 85 |
86 | 87 | 88 | -------------------------------------------------------------------------------- /extra-updateScripts/patch/MW0MWZ/header-menu.inc: -------------------------------------------------------------------------------- 1 |
2 |
Pi-Star: / Dashboard:
3 |

Pi-Star Digital Voice - Expert Editors

4 |

5 | | 6 | | 7 | | 8 | Upgrade | 9 | | 10 | 11 |

12 |

13 | Quick Edit: 14 | DStarRepeater | 15 | ircDDBGateway | 16 | TimeServer | 17 | MMDVMHost | 18 | DMR GW | 19 | YSF GW | 20 | P25 GW | 21 | NXDN GW | 22 | DAPNET GW
23 | Full Edit: 24 | MMDVMHost | 25 | DMR GW | 26 | PiStar-Remote | 27 | WiFi | 28 | BM API | 29 | DAPNET API | 30 | System Cron | 31 | RSSI Dat
32 |  Tools: 33 | CSS Tool | 34 | SSH Access 35 |

36 |
37 | -------------------------------------------------------------------------------- /extra-updateScripts/pistar-css-Color_pink.ini: -------------------------------------------------------------------------------- 1 | [Background] 2 | PageColor=#edf0f5 3 | ContentColor=#ffffff 4 | BannersColor=#f075f8 5 | NavbarColor=#242d31 6 | NavbarHoverColor=#a60000 7 | DropdownColor=#f9f9f9 8 | DropdownHoverColor=#d0d0d0 9 | ServiceCellActiveColor=#11DD11 10 | ServiceCellInactiveColor=#BB5555 11 | ModeCellDisabledColor=#606060 12 | ModeCellActiveColor=#00BB00 13 | ModeCellInactiveColor=#BB0000 14 | ModeCellPausedColor=#ff9933 15 | NavPanelColor=#edf0f5 16 | TableRowBgEvenColor=#f7f7f7 17 | TableRowBgOddColor=#d0d0d0 18 | 19 | [Text] 20 | TextColor=#000000 21 | TextSectionColor=#000000 22 | TextLinkColor=#0000e0 23 | TableHeaderColor=#ffffff 24 | BannersColor=#ffffff 25 | NavbarColor=#ffffff 26 | NavbarHoverColor=#ffffff 27 | DropdownColor=#000000 28 | DropdownHoverColor=#000000 29 | ServiceCellActiveColor=#000000 30 | ServiceCellInactiveColor=#000000 31 | ModeCellDisabledColor=#b0b0b0 32 | ModeCellActiveColor=#003300 33 | ModeCellInactiveColor=#550000 34 | 35 | [ExtraSettings] 36 | LastHeardRows=40 37 | MainFontSize=18 38 | BodyFontSize=17 39 | HeaderFontSize=34 40 | TableBorderColor=#000000 41 | 42 | -------------------------------------------------------------------------------- /extra-updateScripts/pistar-css_Gray.ini: -------------------------------------------------------------------------------- 1 | [Background] 2 | PageColor=#212529 3 | ContentColor=#212529 4 | BannersColor=#2e363f 5 | NavbarColor=#2e363f 6 | NavbarHoverColor=#65737e 7 | DropdownColor=#6b6c73 8 | DropdownHoverColor=#3c3f47 9 | ServiceCellActiveColor=#2c7f2c 10 | ServiceCellInactiveColor=#b23b3b 11 | ModeCellDisabledColor=#535353 12 | ModeCellActiveColor=#2c7f2c 13 | ModeCellInactiveColor=#b23b3b 14 | ModeCellPausedColor=#a65d14 15 | NavPanelColor=#212529 16 | TableRowBgEvenColor=#949494 17 | TableRowBgOddColor=#7a7c80 18 | 19 | [Text] 20 | TextColor=#000000 21 | TextSectionColor=#bebebe 22 | TextLinkColor=#1a2573 23 | TableHeaderColor=#bebebe 24 | BannersColor=#bebebe 25 | NavbarColor=#bebebe 26 | NavbarHoverColor=#ffffff 27 | DropdownColor=#ffffff 28 | DropdownHoverColor=#ffffff 29 | ServiceCellActiveColor=#ffffff 30 | ServiceCellInactiveColor=#bebebe 31 | ModeCellDisabledColor=#b3b3af 32 | ModeCellActiveColor=#ffffff 33 | ModeCellInactiveColor=#bebebe 34 | 35 | [ExtraSettings] 36 | TableBorderColor=#3c3f47 37 | LastHeardRows=40 38 | MainFontSize=18 39 | HeaderFontSize=34 40 | BodyFontSize=17 41 | -------------------------------------------------------------------------------- /extra-updateScripts/pistar-watchdog-WiFi-Keep-Alive.sh: -------------------------------------------------------------------------------- 1 | ### 2 | # @Author: BI7JTA 3 | # @Date: 2023-10-16 15:53:34 4 | # @LastEditTime: 2023-10-16 15:53:34 5 | # @LastEditors: Please set LastEditors 6 | # @Description: Solve BPiM2 betty dhd_prot_ioctl : bus is down. we have nothing to do 7 | # @ScriptPath: /usr/local/sbin/pistar-watchdog-WiFi-Keep-Alive.sh 8 | # @FilePath: /var/log/pi-star/pistar-watchdog-WiFi-Keep-Alive.log 9 | # @TODO: add to service , instead of /etc/rc.local 10 | ### 11 | #!/bin/sh 12 | mkdir -p /var/log/pi-star/ 13 | while true 14 | do 15 | CURTIME=`date "+%Y-%m-%d %H:%M:%S"` 16 | echo "$CURTIME: call WiFi auto Down watchdog, loop after 60s " >> /var/log/pi-star/pistar-watchdog-WiFi-Keep-Alive.log 17 | #Solve BPiM2 betty dhd_prot_ioctl : bus is down. we have nothing to do 18 | if [ -d "/sys/class/net/wlan0" ] && [ ! -d "/sys/class/net/wlan0_ap" ]; then 19 | if [ `cat /sys/class/net/wlan0/operstate` == "down" ]; then 20 | echo "$CURTIME: find WLAN0 down and not in AP mode, call ip link set wlan0 up " >> /var/log/pi-star/pistar-watchdog-WiFi-Keep-Alive.log 21 | ip link set wlan0 up 22 | fi 23 | fi 24 | sleep 60 25 | 26 | done -------------------------------------------------------------------------------- /extra-updateScripts/pistar-watchdog-WiFi-Keep-Alive_NEO.sh: -------------------------------------------------------------------------------- 1 | ### 2 | # @Author: BI7JTA 3 | # @Date: 2023-10-16 15:53:34 4 | # @LastEditTime: 2023-10-16 15:53:34 5 | # @LastEditors: Please set LastEditors 6 | # @Description: Solve BPiM2 betty dhd_prot_ioctl : bus is down. we have nothing to do 7 | # @ScriptPath: /home/pi-star/pistar-watchdog-WiFi-Keep-Alive_NEO.sh 8 | # @FilePath: /var/log/pi-star/pistar-watchdog-WiFi-Keep-Alive_NEO.log 9 | # @TODO: add to service , instead of /etc/rc.local 10 | ### 11 | #!/bin/sh 12 | mkdir -p /var/log/pi-star/ 13 | while true 14 | do 15 | CURTIME=`date "+%Y-%m-%d %H:%M:%S"` 16 | echo "$CURTIME: call WiFi auto Down watchdog, loop after 60s " >> /var/log/pi-star/pistar-watchdog-WiFi-Keep-Alive_NEO.log 17 | 18 | 19 | if [ -d "/sys/class/net/wlan0" ]; then 20 | echo "DEBUG: check /sys/class/net/wlan0 exist " >> /var/log/pi-star/pistar-watchdog-WiFi-Keep-Alive_NEO.log 21 | echo "DEBUG: cat /sys/class/net/wlan0/operstate " >> /var/log/pi-star/pistar-watchdog-WiFi-Keep-Alive_NEO.log 22 | cat /sys/class/net/wlan0/operstate >> /var/log/pi-star/pistar-watchdog-WiFi-Keep-Alive_NEO.log 23 | else 24 | echo "DEBUG: /sys/class/net/wlan0 NOT exist" >> /var/log/pi-star/pistar-watchdog-WiFi-Keep-Alive_NEO.log 25 | fi 26 | 27 | if [ -d "/sys/class/net/wlan0_ap" ]; then 28 | echo "DEBUG: check /sys/class/net/wlan0_ap exist" >> /var/log/pi-star/pistar-watchdog-WiFi-Keep-Alive_NEO.log 29 | else 30 | echo "DEBUG: check /sys/class/net/wlan0_ap NOT exist" >> /var/log/pi-star/pistar-watchdog-WiFi-Keep-Alive_NEO.log 31 | fi 32 | 33 | #Solve BPiM2 betty dhd_prot_ioctl : bus is down. we have nothing to do 34 | if [ -d "/sys/class/net/wlan0" ] && [ ! -d "/sys/class/net/wlan0_ap" ]; then 35 | echo "DEBUG: /sys/class/net/wlan0 exist and /sys/class/net/wlan0_ap NOT exist" >> /var/log/pi-star/pistar-watchdog-WiFi-Keep-Alive_NEO.log 36 | #if [ `cat /sys/class/net/wlan0/operstate` == "down" ]; then 37 | #NOTE: If work in nohup and in /etc/rc.local call, can use this adjustment, it will never got "Down" 38 | if [ `grep -c "down" /sys/class/net/wlan0/operstate` -ne '0' ];then 39 | echo "$CURTIME: find WLAN0 down and not in AP mode, call ip link set wlan0 up " >> /var/log/pi-star/pistar-watchdog-WiFi-Keep-Alive_NEO.log 40 | ip link set wlan0 up 41 | else 42 | echo "DEBUG: something check error, Code:002" >> /var/log/pi-star/pistar-watchdog-WiFi-Keep-Alive_NEO.log 43 | fi 44 | else 45 | echo "DEBUG: something check error, Code:001" >> /var/log/pi-star/pistar-watchdog-WiFi-Keep-Alive_NEO.log 46 | fi 47 | sleep 60 48 | 49 | done 50 | -------------------------------------------------------------------------------- /extra-updateScripts/update-NextionDriver-DMRId.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | ## sudo curl https://www.bi7jta.cn/files/AndyTaylorTweet/updateScripts/update-NextionDriver-DMRId.sh | sudo sh 4 | 5 | sudo mount -o remount,rw / 6 | cd /tmp; sudo rm -f user.*; sudo wget https://www.bi7jta.cn/files/dmrids-and-hosts/user.zip 7 | 8 | cd /tmp; sudo unzip user.zip 9 | stat /tmp/user.csv 10 | sudo mv /tmp/user.csv /usr/local/etc/stripped.csv 11 | stat /usr/local/etc/stripped.csv 12 | sudo systemctl restart nextiondriver 13 | #sudo systemctl status nextiondriver 14 | sudo systemctl restart mmdvmhost 15 | #sudo systemctl status mmdvmhost 16 | 17 | echo "更新完成!" -------------------------------------------------------------------------------- /extra-updateScripts/update-NextionDriver-DMRId_ORG.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | ## sudo curl https://www.bi7jta.cn/files/AndyTaylorTweet/updateScripts/update-NextionDriver-DMRId.sh | sudo sh 4 | 5 | sudo mount -o remount,rw / 6 | cd /tmp; sudo rm -f user.*; sudo wget https://www.bi7jta.org/files/dmrids-and-hosts/user.zip 7 | 8 | cd /tmp; sudo unzip user.zip 9 | stat /tmp/user.csv 10 | sudo mv /tmp/user.csv /usr/local/etc/stripped.csv 11 | stat /usr/local/etc/stripped.csv 12 | sudo systemctl restart nextiondriver 13 | #sudo systemctl status nextiondriver 14 | sudo systemctl restart mmdvmhost 15 | #sudo systemctl status mmdvmhost 16 | 17 | echo "更新完成!" -------------------------------------------------------------------------------- /extra-updateScripts/update_Pi-Star_DMRIdAndHosts-bh7jtb.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JTA-STAR/J-STAR/8756d0fc6fc3163019b28166e0f3f69a4eb2afda/extra-updateScripts/update_Pi-Star_DMRIdAndHosts-bh7jtb.sh -------------------------------------------------------------------------------- /extra-updateScripts/update_Pi-Star_DMRIdAndHosts.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # 这行脚本会把文件下载到/root目录 4 | # sudo curl https://www.bi7jta.cn/files/AndyTaylorTweet/updateScripts/update_Pi-Star_DMRIdAndHosts.sh | sudo sh 5 | 6 | if [ "$(id -u)" != "0" ]; then 7 | echo -e "You need to be root to run this command...\n" 8 | exit 1 9 | fi 10 | 11 | mount -o remount,rw / 12 | cd /home/pi-star; 13 | 14 | # 更新反射器主机文件与DMRID 15 | echo "Download DMRIds and Hostfiles.." 16 | 17 | # Get the Pi-Star Version 18 | pistarCurVersion=$(awk -F "= " '/Version/ {print $2}' /etc/pistar-release) 19 | 20 | DMRIDFILE=/usr/local/etc/DMRIds.dat 21 | DMRHOSTS=/usr/local/etc/DMR_Hosts.txt 22 | P25HOSTS=/usr/local/etc/P25Hosts.txt 23 | YSFHOSTS=/usr/local/etc/YSFHosts.txt 24 | NXDNHOSTS=/usr/local/etc/NXDNHosts.txt 25 | XLXHOSTS=/usr/local/etc/XLXHosts.txt 26 | 27 | # 默认情况下,curl是不会显示下载进度的。但是,你可以通过使用“-#”或“--progress-bar”选项来启用进度条 -s:静默不输出任何信息 28 | 29 | #sudo curl -# -o ${DMRIDFILE} http://125.91.17.122:8090/dmrids-and-hosts/DMRIds.dat --user-agent "Pi-Star_${pistarCurVersion}" 30 | #sudo curl -# -o ${P25HOSTS} http://125.91.17.122:8090/dmrids-and-hosts/P25_Hosts.txt --user-agent "Pi-Star_${pistarCurVersion}" 31 | #sudo curl -# -o ${YSFHOSTS} http://125.91.17.122:8090/dmrids-and-hosts/YSF_Hosts.txt --user-agent "Pi-Star_${pistarCurVersion}" 32 | #sudo curl -# -o ${DMRHOSTS} http://125.91.17.122:8090/dmrids-and-hosts/DMR_Hosts.txt --user-agent "Pi-Star_${pistarCurVersion}" 33 | 34 | sudo curl -# -o ${DMRIDFILE} https://www.bi7jta.cn/files/dmrids-and-hosts/DMRIds.dat --user-agent "Pi-Star_${pistarCurVersion}" 35 | sudo curl -# -o ${P25HOSTS} https://www.bi7jta.cn/files/dmrids-and-hosts/P25Hosts.txt --user-agent "Pi-Star_${pistarCurVersion}" 36 | sudo curl -# -o ${YSFHOSTS} https://www.bi7jta.cn/files/dmrids-and-hosts/YSFHosts.txt --user-agent "Pi-Star_${pistarCurVersion}" 37 | sudo curl -# -o ${DMRHOSTS} https://www.bi7jta.cn/files/dmrids-and-hosts/DMR_Hosts.txt --user-agent "Pi-Star_${pistarCurVersion}" 38 | sudo curl -# -o ${NXDNHOSTS} https://www.bi7jta.cn/files/dmrids-and-hosts/NXDNHosts.txt --user-agent "Pi-Star_${pistarCurVersion}" 39 | sudo curl -# -o ${XLXHOSTS} https://www.bi7jta.cn/files/dmrids-and-hosts/XLXHosts.txt --user-agent "Pi-Star_${pistarCurVersion}" 40 | 41 | mount -o remount,ro / 42 | 43 | sudo systemctl stop pistar-watchdog.service > /dev/null 2>&1 44 | sudo systemctl stop mmdvmhost.service > /dev/null 2>&1 && sleep 2 > /dev/null 2>&1 45 | 46 | sudo systemctl start pistar-watchdog.service# > /dev/null 2>&1 47 | sudo systemctl start mmdvmhost.service #> /dev/null 2>&1 && sleep 2 > /dev/null 2>&1 48 | 49 | ls -l /usr/local/etc 50 | 51 | echo "Done. save to /usr/local/etc"; 52 | 53 | 54 | echo "Done"; -------------------------------------------------------------------------------- /extra-updateScripts/update_Pi-Star_DMRIdAndHosts.sh-bak: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JTA-STAR/J-STAR/8756d0fc6fc3163019b28166e0f3f69a4eb2afda/extra-updateScripts/update_Pi-Star_DMRIdAndHosts.sh-bak -------------------------------------------------------------------------------- /extra-updateScripts/update_Pi-Star_DMRIdAndHosts_ORG.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # 这行脚本会把文件下载到/root目录 4 | # sudo curl https://www.bi7jta.cn/files/AndyTaylorTweet/updateScripts/update_Pi-Star_DMRIdAndHosts.sh | sudo sh 5 | 6 | if [ "$(id -u)" != "0" ]; then 7 | echo -e "You need to be root to run this command...\n" 8 | exit 1 9 | fi 10 | 11 | mount -o remount,rw / 12 | cd /home/pi-star; 13 | 14 | # 更新反射器主机文件与DMRID 15 | echo "Download DMRIds and Hostfiles.." 16 | 17 | # Get the Pi-Star Version 18 | pistarCurVersion=$(awk -F "= " '/Version/ {print $2}' /etc/pistar-release) 19 | 20 | DMRIDFILE=/usr/local/etc/DMRIds.dat 21 | DMRHOSTS=/usr/local/etc/DMR_Hosts.txt 22 | P25HOSTS=/usr/local/etc/P25Hosts.txt 23 | YSFHOSTS=/usr/local/etc/YSFHosts.txt 24 | NXDNHOSTS=/usr/local/etc/NXDNHosts.txt 25 | XLXHOSTS=/usr/local/etc/XLXHosts.txt 26 | 27 | # 默认情况下,curl是不会显示下载进度的。但是,你可以通过使用“-#”或“--progress-bar”选项来启用进度条 -s:静默不输出任何信息 28 | 29 | #sudo curl -# -o ${DMRIDFILE} http://125.91.17.122:8090/dmrids-and-hosts/DMRIds.dat --user-agent "Pi-Star_${pistarCurVersion}" 30 | #sudo curl -# -o ${P25HOSTS} http://125.91.17.122:8090/dmrids-and-hosts/P25_Hosts.txt --user-agent "Pi-Star_${pistarCurVersion}" 31 | #sudo curl -# -o ${YSFHOSTS} http://125.91.17.122:8090/dmrids-and-hosts/YSF_Hosts.txt --user-agent "Pi-Star_${pistarCurVersion}" 32 | #sudo curl -# -o ${DMRHOSTS} http://125.91.17.122:8090/dmrids-and-hosts/DMR_Hosts.txt --user-agent "Pi-Star_${pistarCurVersion}" 33 | 34 | sudo curl -# -o ${DMRIDFILE} https://www.bi7jta.org/files/dmrids-and-hosts/DMRIds.dat --user-agent "Pi-Star_${pistarCurVersion}" 35 | sudo curl -# -o ${P25HOSTS} https://www.bi7jta.org/files/dmrids-and-hosts/P25Hosts.txt --user-agent "Pi-Star_${pistarCurVersion}" 36 | sudo curl -# -o ${YSFHOSTS} https://www.bi7jta.org/files/dmrids-and-hosts/YSFHosts.txt --user-agent "Pi-Star_${pistarCurVersion}" 37 | sudo curl -# -o ${DMRHOSTS} https://www.bi7jta.org/files/dmrids-and-hosts/DMR_Hosts.txt --user-agent "Pi-Star_${pistarCurVersion}" 38 | sudo curl -# -o ${NXDNHOSTS} https://www.bi7jta.org/files/dmrids-and-hosts/NXDNHosts.txt --user-agent "Pi-Star_${pistarCurVersion}" 39 | sudo curl -# -o ${XLXHOSTS} https://www.bi7jta.org/files/dmrids-and-hosts/XLXHosts.txt --user-agent "Pi-Star_${pistarCurVersion}" 40 | 41 | mount -o remount,ro / 42 | 43 | sudo systemctl stop pistar-watchdog.service > /dev/null 2>&1 44 | sudo systemctl stop mmdvmhost.service > /dev/null 2>&1 && sleep 2 > /dev/null 2>&1 45 | 46 | sudo systemctl start pistar-watchdog.service# > /dev/null 2>&1 47 | sudo systemctl start mmdvmhost.service #> /dev/null 2>&1 && sleep 2 > /dev/null 2>&1 48 | 49 | ls -l /usr/local/etc 50 | 51 | echo "Done. save to /usr/local/etc"; 52 | 53 | 54 | echo "Done"; -------------------------------------------------------------------------------- /extra-updateScripts/update_Pi-Star_MMDVMHost.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JTA-STAR/J-STAR/8756d0fc6fc3163019b28166e0f3f69a4eb2afda/extra-updateScripts/update_Pi-Star_MMDVMHost.sh -------------------------------------------------------------------------------- /extra-updateScripts/update_Pi-Star_OnlyHosts.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # 这行脚本会把文件下载到/root目录 4 | # sudo curl https://www.bi7jta.cn/files/AndyTaylorTweet/updateScripts/update_Pi-Star_DMRIdAndHosts.sh | sudo sh 5 | 6 | if [ "$(id -u)" != "0" ]; then 7 | echo -e "You need to be root to run this command...\n" 8 | exit 1 9 | fi 10 | 11 | mount -o remount,rw / 12 | cd /home/pi-star; 13 | 14 | # 更新反射器主机文件与DMRID 15 | echo "Download DMRIds and Hostfiles.." 16 | 17 | # Get the Pi-Star Version 18 | pistarCurVersion=$(awk -F "= " '/Version/ {print $2}' /etc/pistar-release) 19 | 20 | DMRIDFILE=/usr/local/etc/DMRIds.dat 21 | DMRHOSTS=/usr/local/etc/DMR_Hosts.txt 22 | P25HOSTS=/usr/local/etc/P25Hosts.txt 23 | YSFHOSTS=/usr/local/etc/YSFHosts.txt 24 | NXDNHOSTS=/usr/local/etc/NXDNHosts.txt 25 | XLXHOSTS=/usr/local/etc/XLXHosts.txt 26 | 27 | # 默认情况下,curl是不会显示下载进度的。但是,你可以通过使用“-#”或“--progress-bar”选项来启用进度条 -s:静默不输出任何信息 28 | 29 | #sudo curl -# -o ${P25HOSTS} http://125.91.17.122:8090/dmrids-and-hosts/P25_Hosts.txt --user-agent "Pi-Star_${pistarCurVersion}" 30 | #sudo curl -# -o ${YSFHOSTS} http://125.91.17.122:8090/dmrids-and-hosts/YSF_Hosts.txt --user-agent "Pi-Star_${pistarCurVersion}" 31 | #sudo curl -# -o ${DMRHOSTS} http://125.91.17.122:8090/dmrids-and-hosts/DMR_Hosts.txt --user-agent "Pi-Star_${pistarCurVersion}" 32 | 33 | sudo curl -# -o ${P25HOSTS} https://www.bi7jta.cn/files/dmrids-and-hosts/P25Hosts.txt --user-agent "Pi-Star_${pistarCurVersion}" 34 | sudo curl -# -o ${YSFHOSTS} https://www.bi7jta.cn/files/dmrids-and-hosts/YSFHosts.txt --user-agent "Pi-Star_${pistarCurVersion}" 35 | sudo curl -# -o ${DMRHOSTS} https://www.bi7jta.cn/files/dmrids-and-hosts/DMR_Hosts.txt --user-agent "Pi-Star_${pistarCurVersion}" 36 | sudo curl -# -o ${NXDNHOSTS} https://www.bi7jta.cn/files/dmrids-and-hosts/NXDNHosts.txt --user-agent "Pi-Star_${pistarCurVersion}" 37 | sudo curl -# -o ${XLXHOSTS} https://www.bi7jta.cn/files/dmrids-and-hosts/XLXHosts.txt --user-agent "Pi-Star_${pistarCurVersion}" 38 | 39 | mount -o remount,ro / 40 | 41 | sudo systemctl stop pistar-watchdog.service > /dev/null 2>&1 42 | sudo systemctl stop mmdvmhost.service > /dev/null 2>&1 && sleep 2 > /dev/null 2>&1 43 | 44 | sudo systemctl start pistar-watchdog.service# > /dev/null 2>&1 45 | sudo systemctl start mmdvmhost.service #> /dev/null 2>&1 && sleep 2 > /dev/null 2>&1 46 | 47 | ls -l /usr/local/etc 48 | 49 | echo "Done. save to /usr/local/etc"; 50 | 51 | 52 | echo "Done"; -------------------------------------------------------------------------------- /extra-updateScripts/update_Pi-Star_OnlyHosts_ORG.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # 这行脚本会把文件下载到/root目录 4 | # sudo curl https://www.bi7jta.cn/files/AndyTaylorTweet/updateScripts/update_Pi-Star_DMRIdAndHosts.sh | sudo sh 5 | 6 | if [ "$(id -u)" != "0" ]; then 7 | echo -e "You need to be root to run this command...\n" 8 | exit 1 9 | fi 10 | 11 | mount -o remount,rw / 12 | cd /home/pi-star; 13 | 14 | # 更新反射器主机文件与DMRID 15 | echo "Download DMRIds and Hostfiles.." 16 | 17 | # Get the Pi-Star Version 18 | pistarCurVersion=$(awk -F "= " '/Version/ {print $2}' /etc/pistar-release) 19 | 20 | DMRIDFILE=/usr/local/etc/DMRIds.dat 21 | DMRHOSTS=/usr/local/etc/DMR_Hosts.txt 22 | P25HOSTS=/usr/local/etc/P25Hosts.txt 23 | YSFHOSTS=/usr/local/etc/YSFHosts.txt 24 | NXDNHOSTS=/usr/local/etc/NXDNHosts.txt 25 | XLXHOSTS=/usr/local/etc/XLXHosts.txt 26 | 27 | # 默认情况下,curl是不会显示下载进度的。但是,你可以通过使用“-#”或“--progress-bar”选项来启用进度条 -s:静默不输出任何信息 28 | 29 | #sudo curl -# -o ${P25HOSTS} http://125.91.17.122:8090/dmrids-and-hosts/P25_Hosts.txt --user-agent "Pi-Star_${pistarCurVersion}" 30 | #sudo curl -# -o ${YSFHOSTS} http://125.91.17.122:8090/dmrids-and-hosts/YSF_Hosts.txt --user-agent "Pi-Star_${pistarCurVersion}" 31 | #sudo curl -# -o ${DMRHOSTS} http://125.91.17.122:8090/dmrids-and-hosts/DMR_Hosts.txt --user-agent "Pi-Star_${pistarCurVersion}" 32 | 33 | sudo curl -# -o ${P25HOSTS} https://www.bi7jta.org/files/dmrids-and-hosts/P25Hosts.txt --user-agent "Pi-Star_${pistarCurVersion}" 34 | sudo curl -# -o ${YSFHOSTS} https://www.bi7jta.org/files/dmrids-and-hosts/YSFHosts.txt --user-agent "Pi-Star_${pistarCurVersion}" 35 | sudo curl -# -o ${DMRHOSTS} https://www.bi7jta.org/files/dmrids-and-hosts/DMR_Hosts.txt --user-agent "Pi-Star_${pistarCurVersion}" 36 | sudo curl -# -o ${NXDNHOSTS} https://www.bi7jta.org/files/dmrids-and-hosts/NXDNHosts.txt --user-agent "Pi-Star_${pistarCurVersion}" 37 | sudo curl -# -o ${XLXHOSTS} https://www.bi7jta.org/files/dmrids-and-hosts/XLXHosts.txt --user-agent "Pi-Star_${pistarCurVersion}" 38 | 39 | mount -o remount,ro / 40 | 41 | sudo systemctl stop pistar-watchdog.service > /dev/null 2>&1 42 | sudo systemctl stop mmdvmhost.service > /dev/null 2>&1 && sleep 2 > /dev/null 2>&1 43 | 44 | sudo systemctl start pistar-watchdog.service# > /dev/null 2>&1 45 | sudo systemctl start mmdvmhost.service #> /dev/null 2>&1 && sleep 2 > /dev/null 2>&1 46 | 47 | ls -l /usr/local/etc 48 | 49 | echo "Done. save to /usr/local/etc"; 50 | 51 | 52 | echo "Done"; -------------------------------------------------------------------------------- /platformDetect-for-RPi5B-PHP8.2.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | # 3 | # Return the version of the Raspberry Pi we are running on 4 | # Written by Andy Taylor (MW0MWZ) 5 | # Enhanced by W0CHP 6 | # RPi 5B support by BI7JTA@J-STAR 7 | # 8 | # Pi Rev codes available at 9 | 10 | # Pull the CPU Model from /proc/cpuinfo 11 | modelName=$(grep -m 1 'model name' /proc/cpuinfo | sed 's/.*: //') 12 | hardwareField=$(grep 'Hardware' /proc/cpuinfo | sed 's/.*: //') 13 | 14 | # Pi 4B ;;;;;;;;;;;;;;;; 15 | # model name : ARMv7 Processor rev 3 (v7l) 16 | # Hardware : BCM2711 17 | # Revision : b03115 18 | # Serial : 100000006ef719df 19 | # Model : Raspberry Pi 4 Model B Rev 1.5 20 | 21 | # RPi 5B ;;;;;;;;;;;;;;;; 22 | # NO " model name ,Hardware" 23 | # Revision : d04170 24 | # Serial : 683e0fbff53f1a6f 25 | # Model : Raspberry Pi 5 Model B Rev 1.0 26 | 27 | arch=$(uname -m) 28 | 29 | if [ -f /proc/device-tree/model ]; then 30 | raspberryModel=$(tr -d '\0'