Приветствуется размещение своих статей на страницах нашего клуба

» » QNAP - автозапуск
Информация к новости
  • Просмотров: 2 492
  • Автор: Altyn
  • Дата: 19 сентября 2014 23:02
19 сентября 2014 23:02

QNAP - автозапуск


Автор: Altyn | Категория: IMHO / Компьютеры | Просмотров: 2 492

Ссылка на скрипт автозапуска.
http://wiki.qnap.com/wiki/Running_Your_Own_Application_at_Startup

 

QPKG-based method (new)

This method consists of declaring a dummy QPKG which launches your script at startup.

  • Log into your QNAP device using SSH or Telnet, for instance by using Putty
  • Edit QPKG config file:

# vi /etc/config/qpkg.conf

  • Declare a new dummy package by adding something like that in this file:

[autorun]
	Name = autorunVersion = 0.1
	Author = neomilium
	Date = 2013-05-06
	Shell = /share/MD0_DATA/.qpkg/autorun/autorun.sh
	Install_Path = /share/MD0_DATA/.qpkg/autorun
	Enable = TRUE

 

As you can see, Shell is the interesting variable: at boot-time, QNAP OS will launch each QPKG's Shell variable content.

Note: if your NAS doesn't have /share/MD0_DATA (i.e. is a one-drive NAS), put the right directory into the Shell and Install_Path variables and adapt the following commands to your needs.

  • Create the dummy package directory:

# mkdir /share/MD0_DATA/.qpkg/autorun

  • Create the autorun script with the contents of your choice:

# vi /share/MD0_DATA/.qpkg/autorun/autorun.sh


Note: don't forget "#!/bin/sh" at the beginning of script.
  • Set the execute bit:

# chmod +x /share/MD0_DATA/.qpkg/autorun/autorun.sh

 

 

Так же можно научить MC отображать русские буквы в каталогах

 

  • Добавить в скрипт автозапуска

# /bin/echo TERM='xterm' >> /root/.profile
	# /bin/echo TERMINFO='/opt/share/terminfo' >> /root/.profile

 

  • Добавление в прошивку соответсвующих gconv модулей. Устанавливаем из optware

# ipkg install gconv-modules

 

  • Заменяем в скрипте автозапуска родные из прошивки на модули optware

# /bin/mv /usr/lib/gconv /usr/lib/gconv.bak
	# /bin/ln -sf /opt/lib/gconv /usr/lib


Reboot and enjoy!



Метки к статье: qnap autorun


Уважаемый посетитель, Вы зашли на сайт как незарегистрированный пользователь.
Мы рекомендуем Вам зарегистрироваться либо войти на сайт под своим именем.
Информация
Посетители, находящиеся в группе Гость, не могут оставлять комментарии к данной публикации.

Архив новостей

Июль 2024 (1)
Март 2022 (1)
Декабрь 2021 (1)
Март 2021 (2)
Февраль 2021 (1)
Январь 2021 (2)
^