* [Comm] crontab не выполняет скрипт с командой halt
@ 2008-06-29 10:38 Vitalik Salomatin
2008-06-29 10:47 ` Serge
0 siblings, 1 reply; 6+ messages in thread
From: Vitalik Salomatin @ 2008-06-29 10:38 UTC (permalink / raw)
To: community
Помогите.
Напимал скрипт с единственной командой
halt
запускаю от имени рута, выполняет и отключает сервер.
Вставляю скрипт для исполнения в crontab
время проходит, команда не исплнена.
Понимаю, что необходимо дать права или включить crontab в группу root.
Но как это сделать корректнее, лишне не обезопасив сервер.
Спасибо.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Comm] crontab не выполняет скрипт с командой halt
2008-06-29 10:38 [Comm] crontab не выполняет скрипт с командой halt Vitalik Salomatin
@ 2008-06-29 10:47 ` Serge
2008-06-29 10:50 ` Vasyl Tereshko
2008-07-01 4:21 ` Vitalik Salomatin
0 siblings, 2 replies; 6+ messages in thread
From: Serge @ 2008-06-29 10:47 UTC (permalink / raw)
To: Vitalik Salomatin, ALT Linux Community general discussions
В сообщении от Sunday 29 June 2008 13:38:38 Vitalik Salomatin написал(а):
> Помогите.
> Напимал скрипт с единственной командой
> halt
> запускаю от имени рута, выполняет и отключает сервер.
> Вставляю скрипт для исполнения в crontab
> время проходит, команда не исплнена.
> Понимаю, что необходимо дать права или включить crontab в группу root.
> Но как это сделать корректнее, лишне не обезопасив сервер.
> Спасибо.
делали, service crond restart
смотрите /var/log//messages на предмет наличия ошибок
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Comm] crontab не выполняет скрипт с командой halt
2008-06-29 10:47 ` Serge
@ 2008-06-29 10:50 ` Vasyl Tereshko
2008-06-29 10:51 ` Serge
2008-06-29 11:35 ` Denis Kirienko
2008-07-01 4:21 ` Vitalik Salomatin
1 sibling, 2 replies; 6+ messages in thread
From: Vasyl Tereshko @ 2008-06-29 10:50 UTC (permalink / raw)
To: ALT Linux Community general discussions
Serge пишет:
> В сообщении от Sunday 29 June 2008 13:38:38 Vitalik Salomatin написал(а):
>
>> Помогите.
>> Напимал скрипт с единственной командой
>> halt
>> запускаю от имени рута, выполняет и отключает сервер.
>> Вставляю скрипт для исполнения в crontab
>> время проходит, команда не исплнена.
>> Понимаю, что необходимо дать права или включить crontab в группу root.
>> Но как это сделать корректнее, лишне не обезопасив сервер.
>> Спасибо.
>>
> делали, service crond restart
> смотрите /var/log//messages на предмет наличия ошибок
Скорее всего просто проблема в путях - нужно пиисать не halt, а /sbin/halt
--
Толми
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Comm] crontab не выполняет скрипт с командой halt
2008-06-29 10:50 ` Vasyl Tereshko
@ 2008-06-29 10:51 ` Serge
2008-06-29 11:35 ` Denis Kirienko
1 sibling, 0 replies; 6+ messages in thread
From: Serge @ 2008-06-29 10:51 UTC (permalink / raw)
To: ALT Linux Community general discussions
В сообщении от Sunday 29 June 2008 13:50:16 Vasyl Tereshko написал(а):
> Serge пишет:
> > В сообщении от Sunday 29 June 2008 13:38:38 Vitalik Salomatin написал(а):
> >> Помогите.
> >> Напимал скрипт с единственной командой
> >> halt
> >> запускаю от имени рута, выполняет и отключает сервер.
> >> Вставляю скрипт для исполнения в crontab
> >> время проходит, команда не исплнена.
> >> Понимаю, что необходимо дать права или включить crontab в группу root.
> >> Но как это сделать корректнее, лишне не обезопасив сервер.
> >> Спасибо.
> >
> > делали, service crond restart
> > смотрите /var/log//messages на предмет наличия ошибок
>
> Скорее всего просто проблема в путях - нужно пиисать не halt, а /sbin/halt
или PATH
в любов случае нужно смотреть логи
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Comm] crontab не выполняет скрипт с командой halt
2008-06-29 10:50 ` Vasyl Tereshko
2008-06-29 10:51 ` Serge
@ 2008-06-29 11:35 ` Denis Kirienko
1 sibling, 0 replies; 6+ messages in thread
From: Denis Kirienko @ 2008-06-29 11:35 UTC (permalink / raw)
To: community
Vasyl Tereshko пишет:
> Скорее всего просто проблема в путях - нужно пиисать не halt, а /sbin/halt
Именно так, cron работает с PATH, в который не входит каталог /sbin
Кроме логов полезно еще смотреть почту - если запущен локальный почтовый
сервис, то cron отправляет вывод всех команд на почту пользователю root,
а почта для root должна пересылаться какому-нибудь другому пользователю
- смотрите настройки почтового сервера.
--
Денис
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Comm] crontab не выполняет скрипт с командой halt
2008-06-29 10:47 ` Serge
2008-06-29 10:50 ` Vasyl Tereshko
@ 2008-07-01 4:21 ` Vitalik Salomatin
1 sibling, 0 replies; 6+ messages in thread
From: Vitalik Salomatin @ 2008-07-01 4:21 UTC (permalink / raw)
To: community
Все прекрасно заработало
/sbin/halt
и
crontab
все отключает.
Спасибо.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2008-07-01 4:21 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-06-29 10:38 [Comm] crontab не выполняет скрипт с командой halt Vitalik Salomatin
2008-06-29 10:47 ` Serge
2008-06-29 10:50 ` Vasyl Tereshko
2008-06-29 10:51 ` Serge
2008-06-29 11:35 ` Denis Kirienko
2008-07-01 4:21 ` Vitalik Salomatin
ALT Linux Community general discussions
This inbox may be cloned and mirrored by anyone:
git clone --mirror http://lore.altlinux.org/community/0 community/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 community community/ http://lore.altlinux.org/community \
mandrake-russian@linuxteam.iplabs.ru community@lists.altlinux.org community@lists.altlinux.ru community@lists.altlinux.com
public-inbox-index community
Example config snippet for mirrors.
Newsgroup available over NNTP:
nntp://lore.altlinux.org/org.altlinux.lists.community
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git