|
|
| Строка 1: |
Строка 1: |
| <syntaxhighlight lang="bash" line="1">
| |
| #!/bin/bash
| |
| ### SWAP File
| |
| dd if=/dev/zero of=/share/HDA_DATA/.swap/swapfile bs=1024 count=1048576
| |
| mkswap /share/HDA_DATA/.swap/swapfile -L SWAPFILE
| |
| swapon /share/HDA_DATA/.swap/swapfile
| |
|
| |
| ### Upgrade Entware
| |
| /opt/bin/opkg update
| |
| /opt/bin/opkg upgrade
| |
|
| |
| ### miniDLNA config
| |
| if test -a "/opt/etc/minidlna.conf"; then
| |
| rm /opt/etc/minidlna.conf
| |
| ln -s /share/HDA_DATA/.MiniDLNA/minidlna.conf /opt/etc/minidlna.conf
| |
| else
| |
| ln -s /share/HDA_DATA/.MiniDLNA/minidlna.conf /opt/etc/minidlna.conf
| |
| fi
| |
| /opt/etc/init.d/S90minidlna restart
| |
|
| |
| ### Links for Servers
| |
| if test -h "/share/Web/SandBOX-PHP"; then
| |
| rm /share/Web/SandBOX-PHP
| |
| ln -s /share/HDC_DATA/3-SandBOX/PHP /share/Web/SandBOX-PHP
| |
| else
| |
| ln -s /share/HDC_DATA/3-SandBOX/PHP /share/Web/SandBOX-PHP
| |
| fi
| |
|
| |
| ### Rsync
| |
| if [ -L "/mnt/ext/usr/bin/rsync" ]; then
| |
| echo "Файл уже ссылка!"
| |
| else
| |
| if [ -f "/mnt/ext/usr/bin/rsync3.0.7" ]; then
| |
| rm /mnt/ext/usr/bin/rsync3.0.7
| |
| fi
| |
| mv /mnt/ext/usr/bin/rsync /mnt/ext/usr/bin/rsync3.0.7
| |
| ln -s /opt/bin/rsync /mnt/ext/usr/bin/rsync
| |
| fi
| |
| </syntaxhighlight>
| |
|
| |
| =Создание собственного пакета .qpkg= | | =Создание собственного пакета .qpkg= |
|
| |
|
| ==Пример моего кода== | | ==Пример моего кода== |
|
| |
|
| <syntaxhighlight lang="bash"> | | <syntaxhighlight lang="bash" line="1"> |
| #!/bin/bash | | #!/bin/bash |
| ### SWAP File | | ### SWAP File |