The OpenNET Project / Index page

[ новости /+++ | форум | теги | ]




Версия для распечатки Пред. тема | След. тема
Новые ответы [ Отслеживать ]
Помогите! syntax error: unexpected end of file bash , !*! vadian72, 10-Мрт-14, 10:11  [смотреть все]
Всем привет. Со скриптами не очень дружу вопрос к спецам скрипт при запуске выдаёт ошибку:  /usr/local/bin/anticat.sh: line 25: syntax error: unexpected end of file это на Debian 6.0 сам скрипт писал не я где поправить спасибо вот:

#!/bin/bash
a=1
while [ $a -eq 1 ]
do
#проверяем каждые 5 сек жив ли grs в течении 1 минуты
b=1
while [ $b -le 11 ]
do
pid=`ps -aeF | grep grs_2 | grep -v "grep" | awk '{ print $2}'`
pid1=`echo $pid | awk '{ print $1}'`
pid2=`echo $pid | awk '{ print $2}'`
if [ $pid1 -ge 10 ] || [ $pid2 -ge 10 ]; then
echo "good"
else
echo "bad"
/usr/local/bin/./grs_2 -c /etc/grs_2 -b
fi
sleep 5
b=$(($b+1))

done
#reconnect ридеров
wget -c "http://127.0.0.1:18390/status.html?action=restart&label=fff&... -O - > /dev/null
wget -c "http://127.0.0.1:18390/status.html?action=restart&label=zzz&... -O - > /dev/null

  • Помогите! syntax error: unexpected end of file bash , !*! skb7, 11:10 , 10-Мрт-14 (1)
    > где поправить

    Добавить в конец скрипта строку:


    done

    • Помогите! syntax error: unexpected end of file bash , !*! vadian72, 20:54 , 10-Мрт-14 (2)
      >> где поправить
      > Добавить в конец скрипта строку:
      >
       
      > done
      >

      Спасибо вам теперь ок блин надо маны учить,только вот ещё вопросик последний как правильно в этом скрипте в wget авторизацию логин и пароль засунуть в целях безопасности

      • Помогите! syntax error: unexpected end of file bash , !*! skb7, 22:16 , 10-Мрт-14 (3)
        > как правильно в этом скрипте в wget авторизацию логин и пароль
        > засунуть в целях безопасности

        Из мана на wget:


               --http-user=user
               --http-password=password
                   Specify the username user and password password on an HTTP server.  According to the type of the challenge, Wget
                   will encode them using either the "basic" (insecure), the "digest", or the Windows "NTLM" authentication scheme.

                   Another way to specify username and password is in the URL itself.  Either method reveals your password to anyone
                   who bothers to run "ps".  To prevent the passwords from being seen, store them in .wgetrc or .netrc, and make sure
                   to protect those files from other users with "chmod".  If the passwords are really important, do not leave them
                   lying in those files either---edit the files and delete them after Wget has started the download.


        Если этого будет недостаточно, можно посмотреть в сторону curl.




Партнёры:
PostgresPro
Inferno Solutions
Hosting by Hoster.ru
Хостинг:

Закладки на сайте
Проследить за страницей
Created 1996-2024 by Maxim Chirkov
Добавить, Поддержать, Вебмастеру