Commands fix?

40 views
Skip to first unread message

Karl Schmidt

unread,
May 17, 2013, 9:29:14 PM5/17/13
to wa...@googlegroups.com
How about:

$ wajig commands depend

doing something like

$ wajig commands | grep -iA4 depend





--
--------------------------------------------------------------------------------
Karl Schmidt EMail Ka...@xtronics.com
Transtronics, Inc. WEB http://secure.transtronics.com
3209 West 9th Street Ph (785) 841-3089
Lawrence, KS 66049 FAX (785) 841-0434

Truth is mighty and will prevail.
There is nothing wrong with this,
except that it ain't so.
--Mark Twain

--------------------------------------------------------------------------------

Karl Schmidt

unread,
May 18, 2013, 4:44:12 PM5/18/13
to wa...@googlegroups.com

Tshepang Lekhonkhobe

unread,
Jul 8, 2013, 3:12:59 PM7/8/13
to wa...@googlegroups.com
On Sat, May 18, 2013 at 3:29 AM, Karl Schmidt <ka...@xtronics.com> wrote:
> How about:
>
> $ wajig commands depend
>
> doing something like
>
> $ wajig commands | grep -iA4 depend

I am lost.

Karl Schmidt

unread,
Jul 8, 2013, 11:41:35 PM7/8/13
to wa...@googlegroups.com
Because the 'new' version command listings are more than one line.. if you script it so it takes a
augment it becomes useful.


BTW - wajig as of version 2.7.3 found in wheezy, breaks scripts if used in a bash script to start
and stop services.. complains of /bin/sh service not found.

Tshepang Lekhonkhobe

unread,
Jul 9, 2013, 4:17:27 AM7/9/13
to wa...@googlegroups.com
On Tue, Jul 9, 2013 at 5:41 AM, Karl Schmidt <ka...@xtronics.com> wrote:
> On 07/08/2013 02:12 PM, Tshepang Lekhonkhobe wrote:
>>
>> On Sat, May 18, 2013 at 3:29 AM, Karl Schmidt <ka...@xtronics.com> wrote:
>>>
>>> How about:
>>>
>>> $ wajig commands depend
> BTW - wajig as of version 2.7.3 found in wheezy, breaks scripts if used in
> a bash script to start and stop services.. complains of /bin/sh service not
> found.

I haven't seen that issue. Do you have the full error message?

Karl Schmidt

unread,
Jul 9, 2013, 8:44:08 PM7/9/13
to wa...@googlegroups.com
The script if run from crontab returns an email :
/bin/sh: 1: service: not found

This is the script:

#!/bin/bash
wajig restart exim4


The restart is using the service command


changing the script to:

/etc/init.d/exim4 restart

works fine.

The path for cron is /usr/bin:/bin ( no /usr/sbin where service lives)
So the path for service is not found - thus no service.

To test this - set up a cron job that runs env > ~/tmp

Then look at tmp







-







--
--------------------------------------------------------------------------------
Karl Schmidt EMail Ka...@xtronics.com
Transtronics, Inc. WEB http://secure.transtronics.com
3209 West 9th Street Ph (785) 841-3089
Lawrence, KS 66049 FAX (785) 841-0434

Save electrons! Don't put stupid tag-lines like this in emails.
-kps
--------------------------------------------------------------------------------

Tshepang Lekhonkhobe

unread,
Jul 10, 2013, 3:07:34 AM7/10/13
to wa...@googlegroups.com
I would rather not do "/etc/init.d/exim4 restart" since
"/usr/sbin/service exim4 restart" is a more portable command. Given
that, what do you suggest as a solution?
Reply all
Reply to author
Forward
0 new messages