From 19ac052d3a2abdf2d10a8d2a9661fc448ee68869 Mon Sep 17 00:00:00 2001 From: viktor138irk <78488229+viktor138irk@users.noreply.github.com> Date: Fri, 11 Jul 2025 22:26:53 +0900 Subject: [PATCH] Add files via upload --- index.html | 12 +++++++ unit/index.html | 11 ++++++ unit/xlx.service | 13 +++++++ unit/xlx.timer | 10 ++++++ xlx-cron.sh | 23 +++++++++++++ xlx-del.sh | 52 ++++++++++++++++++++++++++++ xlx-get.sh | 30 ++++++++++++++++ xlx-getdmrid.sh | 21 ++++++++++++ xlx-gethost.sh | 89 ++++++++++++++++++++++++++++++++++++++++++++++++ xlx-update.sh | 18 ++++++++++ xlx.sh | 32 +++++++++++++++++ 11 files changed, 311 insertions(+) create mode 100644 index.html create mode 100644 unit/index.html create mode 100644 unit/xlx.service create mode 100644 unit/xlx.timer create mode 100644 xlx-cron.sh create mode 100644 xlx-del.sh create mode 100644 xlx-get.sh create mode 100644 xlx-getdmrid.sh create mode 100644 xlx-gethost.sh create mode 100644 xlx-update.sh create mode 100644 xlx.sh diff --git a/index.html b/index.html new file mode 100644 index 0000000..7bc1f79 --- /dev/null +++ b/index.html @@ -0,0 +1,12 @@ +Заходим в хотспот, вкладки:
+Configuration/Expert/SSH Access
+Вводим логин - pi-star,
+пароль - raspberry. (ПРИ ВВОДЕ НЕ ОТОБРАЖАЕТСЯ!)
+копируем и вставляем следующий текст:

+
+rpi-rw; wget --user=yktsrv --ask-password https://xlx.dmrykt.ru/pistar/xlx.sh; chmod +x ./xlx.sh; sudo /home/pi-star/xlx.sh;

+enter
+пароль для установки (Вам должны были выдать при регистрации) - . (ПРИ ВВОДЕ НЕ ОТОБРАЖАЕТСЯ!)
+enter
+ждем надпись Finish
+

diff --git a/unit/index.html b/unit/index.html new file mode 100644 index 0000000..29f4e96 --- /dev/null +++ b/unit/index.html @@ -0,0 +1,11 @@ + + + + Setup SML Scripts - UNIT + + +

Setup SML Scripts - UNIT

+

Setup SML Scripts - UNIT

+
+ + diff --git a/unit/xlx.service b/unit/xlx.service new file mode 100644 index 0000000..b657387 --- /dev/null +++ b/unit/xlx.service @@ -0,0 +1,13 @@ +[Unit] +Description=XLX launcher scripts +Wants=xlx.timer + +[Service] +Type=oneshot +User=root +ExecStart=xlx-update +ExecStart=xlx-getdmrid +ExecStart=xlx-gethost + +[Install] +WantedBy=multi-user.target \ No newline at end of file diff --git a/unit/xlx.timer b/unit/xlx.timer new file mode 100644 index 0000000..0145feb --- /dev/null +++ b/unit/xlx.timer @@ -0,0 +1,10 @@ +[Unit] +Description=XLX launcher scripts +Requires=xlx.service + +[Timer] +Unit=xlx.service +OnCalendar=*-*-* *:00/10:00 + +[Install] +WantedBy=timers.target \ No newline at end of file diff --git a/xlx-cron.sh b/xlx-cron.sh new file mode 100644 index 0000000..d08b51e --- /dev/null +++ b/xlx-cron.sh @@ -0,0 +1,23 @@ +#!/usr/bin/env bash + +mount -o remount,rw / + +XLXFOLDER=/xlx + +if [ -f /usr/local/sbin/pistar-daily.cron ];then + sed -i "s/^\/usr\/local\/sbin\/HostFilesUpdate.sh.*/\/usr\/local\/sbin\/HostFilesUpdate.sh;xlx-gethost;xlx-rw;xlx-getdmrid-force;/" /usr/local/sbin/pistar-daily.cron +fi + +if [ ! -L /etc/systemd/system/xlx.service ]; then + ln -s ${XLXFOLDER}/unit/xlx.service /etc/systemd/system/xlx.service +fi + +if [ ! -L /etc/systemd/system/xlx.timer ]; then + ln -s ${XLXFOLDER}/unit/xlx.timer /etc/systemd/system/xlx.timer +fi + +systemctl daemon-reload +systemctl enable xlx.timer &>/dev/null +systemctl start xlx.timer + +exit 0 \ No newline at end of file diff --git a/xlx-del.sh b/xlx-del.sh new file mode 100644 index 0000000..fad6202 --- /dev/null +++ b/xlx-del.sh @@ -0,0 +1,52 @@ +#!/usr/bin/env bash + +mount -o remount,rw / + +systemctl disable xlx.timer xlx.service &>/dev/null +systemctl stop xlx.timer xlx.service &>/dev/null + +if [ -L /etc/systemd/system/xlx.service ]; then + unlink /etc/systemd/system/xlx.service +fi +if [ -L /etc/systemd/system/xlx.timer ]; then + unlink /etc/systemd/system/xlx.timer +fi + +systemctl daemon-reload + +if [ -f /usr/local/sbin/pistar-daily.cron ]; then + sed -i "s/^\/usr\/local\/sbin\/HostFilesUpdate.sh.*/\/usr\/local\/sbin\/HostFilesUpdate.sh/" /usr/local/sbin/pistar-daily.cron +fi + +find /usr/local/bin/ -type l -name "xlx-*" -delete + +if [ -d /xlx ]; then + rm -rf /tmp +fi + +wget -O /usr/local/etc/DMRIds.dat https://xlx.dmrykt.ru/pistar/DMRIds.dat + +# Old files +if [ -f /etc/cron.d/xlx-cron ]; then + rm -rf /etc/cron.d/xlx-cron +fi +if [ -f /usr/local/bin/xlx-del ]; then + rm -rf /usr/local/bin/xlx-del +fi +if [ -f /usr/local/bin/xlx-getdmrid ]; then + rm -rf /usr/local/bin/xlx-getdmrid +fi +if [ -f /usr/local/bin/xlx-gethost ]; then + rm -rf /usr/local/bin/xlx-gethost +fi +if [ -f /usr/local/bin/xlx-update ]; then + rm -rf /usr/local/bin/xlx-update +fi +if [ -f /usr/local/etc/DMRIdsYKT.dat ]; then + rm -rf /usr/local/etc/DMRIdsYKT.dat +fi +if [ -f /usr/local/etc/DMRIds.dat-export ]; then + rm -rf /usr/local/etc/DMRIds.dat-export +fi + +exit 0 \ No newline at end of file diff --git a/xlx-get.sh b/xlx-get.sh new file mode 100644 index 0000000..7de72d1 --- /dev/null +++ b/xlx-get.sh @@ -0,0 +1,30 @@ +#!/usr/bin/env bash + +mount -o remount,rw / + +XLXFOLDER=/xlx + +mkdir -p ${XLXFOLDER}/scripts +mkdir -p ${XLXFOLDER}/temp +mkdir -p ${XLXFOLDER}/data +mkdir -p ${XLXFOLDER}/unit + +wget -q -N -P ${XLXFOLDER}/scripts/ https://xlx.dmrykt.ru/pistar/xlx-cron.sh +wget -q -N -P ${XLXFOLDER}/scripts/ https://xlx.dmrykt.ru/pistar/xlx-getdmrid.sh +wget -q -N -P ${XLXFOLDER}/scripts/ https://xlx.dmrykt.ru/pistar/xlx-gethost.sh +wget -q -N -P ${XLXFOLDER}/scripts/ https://xlx.dmrykt.ru/pistar/xlx-update.sh +wget -q -N -P ${XLXFOLDER}/scripts/ https://xlx.dmrykt.ru/pistar/xlx-del.sh + + +ln -s ${XLXFOLDER}/scripts/xlx-cron.sh /usr/local/bin/xlx-cron +ln -s ${XLXFOLDER}/scripts/xlx-getdmrid.sh /usr/local/bin/xlx-getdmrid +ln -s ${XLXFOLDER}/scripts/xlx-gethost.sh /usr/local/bin/xlx-gethost +ln -s ${XLXFOLDER}/scripts/xlx-update.sh /usr/local/bin/xlx-update +ln -s ${XLXFOLDER}/scripts/xlx-del.sh /usr/local/bin/xlx-del + +chmod +x ${XLXFOLDER}/scripts/*.sh + +wget -q -N -P ${XLXFOLDER}/unit/ https://xlx.dmrykt.ru/pistar/unit/xlx.service +wget -q -N -P ${XLXFOLDER}/unit/ https://xlx.dmrykt.ru/pistar/unit/xlx.timer + +exit 0 diff --git a/xlx-getdmrid.sh b/xlx-getdmrid.sh new file mode 100644 index 0000000..87c3b7a --- /dev/null +++ b/xlx-getdmrid.sh @@ -0,0 +1,21 @@ +#!/usr/bin/env bash + +mount -o remount,rw / + +XLXFOLDER=/xlx +DMRIDSFILE=/usr/local/etc/DMRIds.dat +XLXFILETIMEOLD=0 +DMRFILETIMEOLD=0 +DMRTFileOld=0 +XLXFILETIME=0 +DMRFILETIME=0 +DMRTFile=0 + +wget -q -N -P ${XLXFOLDER}/data/ https://xlx.dmrykt.ru/pistar/DMRIdsYKT.dat +wget -q -N -P ${XLXFOLDER}/data/ https://xlx.dmrykt.ru/pistar/DMRIds.dat + +cp ${XLXFOLDER}/data/DMRIds.dat ${XLXFOLDER}/temp/DMRIds.dat +sed -i "/^103.*/d" ${XLXFOLDER}/temp/DMRIds.dat +cat ${XLXFOLDER}/temp/DMRIds.dat ${XLXFOLDER}/data/DMRIdsYKT.dat > ${DMRIDSFILE} + +exit 0 diff --git a/xlx-gethost.sh b/xlx-gethost.sh new file mode 100644 index 0000000..d3c0210 --- /dev/null +++ b/xlx-gethost.sh @@ -0,0 +1,89 @@ +#!/usr/bin/env bash + +mount -o remount,rw / + +sed -i "/^114.*/d" /usr/local/etc/XLXHosts.txt +echo "114;89.111.154.99;4004" >> /usr/local/etc/XLXHosts.txt + +sed -i "/^391.*/d" /usr/local/etc/XLXHosts.txt +echo "391;212.3.149.253;4004" >> /usr/local/etc/XLXHosts.txt + +sed -i "/^780.*/d" /usr/local/etc/XLXHosts.txt +echo "780;46.138.248.163;4004" >> /usr/local/etc/XLXHosts.txt + +sed -i "/^YKT.*/d" /usr/local/etc/XLXHosts.txt +echo "YKT;89.111.154.99;4004" >> /usr/local/etc/XLXHosts.txt +echo "YKT;89.111.154.99;4004" > /root/XLXHosts.txt + +sed -i "/^SMK.*/d" /usr/local/etc/XLXHosts.txt +echo "SMK;212.3.149.253;4004" >> /usr/local/etc/XLXHosts.txt +echo "SMK;212.3.149.253;4004" > /root/XLXHosts.txt + +sed -i "/^ARK.*/d" /usr/local/etc/XLXHosts.txt +echo "ARK;46.138.248.163;4004" >> /usr/local/etc/XLXHosts.txt +echo "ARK;46.138.248.163;4004" > /root/XLXHosts.txt + +sed -i "/^11400.*/d" /usr/local/etc/YSFHosts.txt +echo "11400;RU-C4FM YKUTIA;@DMRYKT;89.111.154.99;42000;000" >> /usr/local/etc/YSFHosts.txt +echo "11400;RU-C4FM YKUTIA;@DMRYKT;89.111.154.99;42000;000" > /root/YSFHosts.txt + +sed -i "/^39100.*/d" /usr/local/etc/YSFHosts.txt +echo "39100;RU-C4FM SMOLENSK;@XLXSMK;212.3.149.253;42000;000" >> /usr/local/etc/YSFHosts.txt +echo "39100;RU-C4FM SMOLENSK;@XLXSMK;212.3.149.253;42000;000" > /root/YSFHosts.txt + +sed -i "/^78000.*/d" /usr/local/etc/YSFHosts.txt +echo "78000;XLX780;XLX ARK-MSK;46.138.248.163;42000;000" >> /usr/local/etc/YSFHosts.txt +echo "78000;XLX780;XLX ARK-MSK;46.138.248.163;42000;000" > /root/YSFHosts.txt + +sed -i "/^XLX_114.*/d" /usr/local/etc/DMR_Hosts.txt +echo "XLX_114 0000 89.111.154.99 passw0rd 62030" >> /usr/local/etc/DMR_Hosts.txt +echo "XLX_114 0000 89.111.154.99 passw0rd 62030" > /root/DMR_Hosts.txt + +sed -i "/^XLX_391.*/d" /usr/local/etc/DMR_Hosts.txt +echo "XLX_391 0000 212.3.149.253 passw0rd 62030" >> /usr/local/etc/DMR_Hosts.txt +echo "XLX_391 0000 212.3.149.253 passw0rd 62030" > /root/DMR_Hosts.txt + +sed -i "/^XLX_780.*/d" /usr/local/etc/DMR_Hosts.txt +echo "XLX_780 0000 46.138.248.163 passw0rd 62030" >> /usr/local/etc/DMR_Hosts.txt +echo "XLX_780 0000 46.138.248.163 passw0rd 62030" > /root/DMR_Hosts.txt + +sed -i "/^XLX_YKT.*/d" /usr/local/etc/DMR_Hosts.txt +echo "XLX_YKT 0000 89.111.154.99 passw0rd 62030" >> /usr/local/etc/DMR_Hosts.txt +echo "XLX_YKT 0000 89.111.154.99 passw0rd 62030" > /root/DMR_Hosts.txt + +sed -i "/^XLX_SMK.*/d" /usr/local/etc/DMR_Hosts.txt +echo "XLX_SMK 0000 212.3.149.253 passw0rd 62030" >> /usr/local/etc/DMR_Hosts.txt +echo "XLX_SMK 0000 212.3.149.253 passw0rd 62030" > /root/DMR_Hosts.txt + +sed -i "/^ARK.*/d" /usr/local/etc/DMR_Hosts.txt +echo "XLX_ARK 0000 46.138.248.163 passw0rd 62030" >> /usr/local/etc/DMR_Hosts.txt +echo "XLX_ARK 0000 46.138.248.163 passw0rd 62030" > /root/DMR_Hosts.txt + +sed -i "/^114*/d" /usr/local/etc/P25Hosts.txt +echo "11400 89.111.154.99 41000" >> /usr/local/etc/P25Hosts.txt +echo "11400 89.111.154.99 41000" > /root/P25Hosts.txt + +sed -i "/^391*/d" /usr/local/etc/P25Hosts.txt +echo "39100 212.3.149.253 41000" >> /usr/local/etc/P25Hosts.txt +echo "39100 212.3.149.253 41000" > /root/P25Hosts.txt + +sed -i "/^780*/d" /usr/local/etc/P25Hosts.txt +echo "78000 46.138.248.163 41000" >> /usr/local/etc/P25Hosts.txt +echo "78000 46.138.248.163 41000" > /root/P25Hosts.txt + +sed -i "/^HB_YKT_YAKUTIA.*/d" /usr/local/etc/DMR_Hosts.txt +echo "HB_YKT_YAKUTIA_NETWORK 2001 89.111.154.99 passw0rd 62032" >> /usr/local/etc/DMR_Hosts.txt +echo "HB_YKT_YAKUTIA_NETWORK 2001 89.111.154.99 passw0rd 62032" > /root/DMR_Hosts.txt + +sed -i "/^BM_1114_.*/d" /usr/local/etc/DMR_Hosts.txt +echo "BM_1114_Russia_YKTDMR 2001 89.111.154.99 passw0rd 62032" >> /usr/local/etc/DMR_Hosts.txt +echo "BM_1114_Russia_YKTDMR 2001 89.111.154.99 passw0rd 62032" > /root/DMR_Hosts.txt + +sed -i "/^DMR+_YAKUTIA.*/d" /usr/local/etc/DMR_Hosts.txt +echo "DMR+_YAKUTIA-RUSSIA-A 362823 89.111.154.99 passw0rd 62032" >> /usr/local/etc/DMR_Hosts.txt +echo "DMR+_YAKUTIA-RUSSIA-A 362823 89.111.154.99 passw0rd 62032" > /root/DMR_Hosts.txt + + + + +exit 0 \ No newline at end of file diff --git a/xlx-update.sh b/xlx-update.sh new file mode 100644 index 0000000..7498654 --- /dev/null +++ b/xlx-update.sh @@ -0,0 +1,18 @@ +#!/usr/bin/env bash + +mount -o remount,rw / + +XLXFOLDER=/xlx + +wget -q -N -P ${XLXFOLDER}/scripts/ https://xlx.dmrykt.ru/pistar/xlx-cron.sh +wget -q -N -P ${XLXFOLDER}/scripts/ https://xlx.dmrykt.ru/pistar/xlx-del.sh +wget -q -N -P ${XLXFOLDER}/scripts/ https://xlx.dmrykt.ru/pistar/xlx-getdmrid.sh +wget -q -N -P ${XLXFOLDER}/scripts/ https://xlx.dmrykt.ru/pistar/xlx-gethost.sh +wget -q -N -P ${XLXFOLDER}/scripts/ https://xlx.dmrykt.ru/pistar/xlx-update.sh + +chmod +x ${XLXFOLDER}/scripts/*.sh + +wget -q -N -P ${XLXFOLDER}/unit/ https://xlx.dmrykt.ru/pistar/unit/xlx.service +wget -q -N -P ${XLXFOLDER}/unit/ https://xlx.dmrykt.ru/pistar/unit/xlx.timer + +exit 0 diff --git a/xlx.sh b/xlx.sh new file mode 100644 index 0000000..5d14a61 --- /dev/null +++ b/xlx.sh @@ -0,0 +1,32 @@ +#!/usr/bin/env bash + + +wget -P /home/pi-star/ https://xlx.dmrykt.ru/pistar/xlx-del.sh &>/dev/null +wget -P /home/pi-star/ https://xlx.dmrykt.ru/pistar/xlx-get.sh &>/dev/null + +chmod +x /home/pi-star/xlx-*.sh + +/home/pi-star/xlx-del.sh +/home/pi-star/xlx-get.sh + + + +echo "Progress: 1/5" +xlx-cron + +echo "Progress: 2/5" +xlx-gethost + +echo "Progress: 3/5" +xlx-getdmrid + +echo "Progress: 4/5" +xlx-update + +echo "Progress: 5/5" +rm -rf /home/pi-star/xlx-*.sh +rm -rf /home/pi-star/xlx.sh + +echo "-----<===== FINISH =====>-----" + +exit 0 \ No newline at end of file