Topics

DTMF Reboot Script


Klaus Rung
 

Has anyone made a dtmf reboot script that can be executed over the link radio, or network card restart?

Klaus
ve3kr
2450


k9dc
 

Yes. But it is not really a script, rather the command just has to be added to custom_decode.

-k9dc

On Mar 30, 2020, at 14:33, Klaus Rung via Groups.Io <k_rung=yahoo.com@groups.io> wrote:

Has anyone made a dtmf reboot script that can be executed over the link radio, or network card restart?

Klaus
ve3kr
2450


Klaus Rung
 

How do you do that Dave, can you give an example?


On Monday, March 30, 2020, 2:38:56 p.m. EDT, k9dc <dave@...> wrote:



Yes.  But it is not really a script, rather the command just has to be added to custom_decode.

-k9dc

> On Mar 30, 2020, at 14:33, Klaus Rung via Groups.Io <k_rung=yahoo.com@groups.io> wrote:
>
> Has anyone made a dtmf reboot script that can be executed over the link radio, or network card restart?
>
> Klaus
> ve3kr
> 2450






 

H Klaus;

Try in your custom_decode

if [ "$1" = "XXX" ] ; then "sudo /usr/bin/reboot" ; exit 1 ; fi


** Dave Parks **
IRLP Node: 8139
1-734-219-2010
Correspondent Amateur Radio Newsline



On Monday, March 30, 2020, 2:33:46 PM EDT, Klaus Rung via Groups.Io <k_rung@...> wrote:


Has anyone made a dtmf reboot script that can be executed over the link radio, or network card restart?

Klaus
ve3kr
2450


Klaus Rung
 

Boy, lot's of people have done this before, thanks for all the help


On Monday, March 30, 2020, 2:52:33 p.m. EDT, Dave Parks - WB8ODF via Groups.Io <wb8odf@...> wrote:


H Klaus;

Try in your custom_decode

if [ "$1" = "XXX" ] ; then "sudo /usr/bin/reboot" ; exit 1 ; fi


** Dave Parks **
IRLP Node: 8139
1-734-219-2010
Correspondent Amateur Radio Newsline



On Monday, March 30, 2020, 2:33:46 PM EDT, Klaus Rung via Groups.Io <k_rung@...> wrote:


Has anyone made a dtmf reboot script that can be executed over the link radio, or network card restart?

Klaus
ve3kr
2450


 

Did you get it working?


** Dave Parks **
IRLP Node: 8139
1-734-219-2010
Correspondent Amateur Radio Newsline



On Monday, March 30, 2020, 3:12:27 PM EDT, Klaus Rung via Groups.Io <k_rung@...> wrote:


Boy, lot's of people have done this before, thanks for all the help


On Monday, March 30, 2020, 2:52:33 p.m. EDT, Dave Parks - WB8ODF via Groups.Io <wb8odf@...> wrote:


H Klaus;

Try in your custom_decode

if [ "$1" = "XXX" ] ; then "sudo /usr/bin/reboot" ; exit 1 ; fi


** Dave Parks **
IRLP Node: 8139
1-734-219-2010
Correspondent Amateur Radio Newsline



On Monday, March 30, 2020, 2:33:46 PM EDT, Klaus Rung via Groups.Io <k_rung@...> wrote:


Has anyone made a dtmf reboot script that can be executed over the link radio, or network card restart?

Klaus
ve3kr
2450


David Cameron - IRLP
 

You also have to add the user and command to the /etc/sudoers file (with a NOPASSWD field) to allow the repeater user root access to run that command:

# User privilege specification
root    ALL=(ALL:ALL) ALL
# ADD THIS LINE TO ALLOW repeater USER TO REBOOT
repeater     ALL=NOPASSWD:/sbin/reboot

Then, as repeater, try running

sudo /sbin/reboot

And see what happens. As all of my nodes are remote to here, and I don't want to reboot them unless absolutely required, I can't really test this.

Dave Cameron

On 30/03/2020 12:14 p.m., Dave Parks - WB8ODF via Groups.Io wrote:
Did you get it working?


** Dave Parks **
WB8ODF@... <mailto:WB8ODF@...>
http://wb8odf.com
/IRLP Node: 8139/
/1-734-219-2010
/
/Correspondent Amateur Radio Newsline/
<mailto:dave@...>



On Monday, March 30, 2020, 3:12:27 PM EDT, Klaus Rung via Groups.Io <k_rung=yahoo.com@groups.io> wrote:


Boy, lot's of people have done this before, thanks for all the help


On Monday, March 30, 2020, 2:52:33 p.m. EDT, Dave Parks - WB8ODF via Groups.Io <wb8odf=yahoo.com@groups.io> wrote:


H Klaus;

Try in your custom_decode

if [ "$1" = "XXX" ] ; then "sudo /usr/bin/reboot" ; exit 1 ; fi


** Dave Parks **
WB8ODF@... <mailto:WB8ODF@...>
http://wb8odf.com
/IRLP Node: 8139/
/1-734-219-2010
/
/Correspondent Amateur Radio Newsline/
<mailto:dave@...>



On Monday, March 30, 2020, 2:33:46 PM EDT, Klaus Rung via Groups.Io <k_rung=yahoo.com@groups.io> wrote:


Has anyone made a dtmf reboot script that can be executed over the link radio, or network card restart?

Klaus
ve3kr
2450


 

Dave C is correct... sorry I often assume people have already added the access to sudo via the /etc/sudoers file only because a lot of my scripts call for it.


** Dave Parks **
IRLP Node: 8139
1-734-219-2010
Correspondent Amateur Radio Newsline



On Monday, March 30, 2020, 3:24:55 PM EDT, David Cameron - IRLP <dcameron@...> wrote:


You also have to add the user and command to the /etc/sudoers file (with
a NOPASSWD field) to allow the repeater user root access to run that
command:

# User privilege specification
root    ALL=(ALL:ALL) ALL
# ADD THIS LINE TO ALLOW repeater USER TO REBOOT
repeater     ALL=NOPASSWD:/sbin/reboot

Then, as repeater, try running

sudo /sbin/reboot

And see what happens. As all of my nodes are remote to here, and I don't
want to reboot them unless absolutely required, I can't really test this.

Dave Cameron

On 30/03/2020 12:14 p.m., Dave Parks - WB8ODF via Groups.Io wrote:
> Did you get it working?
>
>
> ** Dave Parks **
> WB8ODF@... <mailto:WB8ODF@...>
> http://wb8odf.com
> /IRLP Node: 8139/
> /1-734-219-2010
> /
> /Correspondent Amateur Radio Newsline/
> <mailto:dave@...>
>
>
>
> On Monday, March 30, 2020, 3:12:27 PM EDT, Klaus Rung via Groups.Io
> <k_rung=yahoo.com@groups.io> wrote:
>
>
> Boy, lot's of people have done this before, thanks for all the help
>
>
> On Monday, March 30, 2020, 2:52:33 p.m. EDT, Dave Parks - WB8ODF via
> Groups.Io <wb8odf=yahoo.com@groups.io> wrote:
>
>
> H Klaus;
>
> Try in your custom_decode
>
> if [ "$1" = "XXX" ] ; then "sudo /usr/bin/reboot" ; exit 1 ; fi
>
>
> ** Dave Parks **
> WB8ODF@... <mailto:WB8ODF@...>
> http://wb8odf.com
> /IRLP Node: 8139/
> /1-734-219-2010
> /
> /Correspondent Amateur Radio Newsline/
> <mailto:dave@...>
>
>
>
> On Monday, March 30, 2020, 2:33:46 PM EDT, Klaus Rung via Groups.Io
> <k_rung=yahoo.com@groups.io> wrote:
>
>
> Has anyone made a dtmf reboot script that can be executed over the
> link radio, or network card restart?
>
> Klaus
> ve3kr
> 2450
>




Klaus Rung
 

I was just trying it here on a node downstairs and it did not work so will try what you suggested.

On Monday, March 30, 2020, 3:24:56 p.m. EDT, David Cameron - IRLP <dcameron@...> wrote:


You also have to add the user and command to the /etc/sudoers file (with
a NOPASSWD field) to allow the repeater user root access to run that
command:

# User privilege specification
root    ALL=(ALL:ALL) ALL
# ADD THIS LINE TO ALLOW repeater USER TO REBOOT
repeater     ALL=NOPASSWD:/sbin/reboot

Then, as repeater, try running

sudo /sbin/reboot

And see what happens. As all of my nodes are remote to here, and I don't
want to reboot them unless absolutely required, I can't really test this.

Dave Cameron

On 30/03/2020 12:14 p.m., Dave Parks - WB8ODF via Groups.Io wrote:
> Did you get it working?
>
>
> ** Dave Parks **
> WB8ODF@... <mailto:WB8ODF@...>
> http://wb8odf.com
> /IRLP Node: 8139/
> /1-734-219-2010
> /
> /Correspondent Amateur Radio Newsline/
> <mailto:dave@...>
>
>
>
> On Monday, March 30, 2020, 3:12:27 PM EDT, Klaus Rung via Groups.Io
> <k_rung=yahoo.com@groups.io> wrote:
>
>
> Boy, lot's of people have done this before, thanks for all the help
>
>
> On Monday, March 30, 2020, 2:52:33 p.m. EDT, Dave Parks - WB8ODF via
> Groups.Io <wb8odf=yahoo.com@groups.io> wrote:
>
>
> H Klaus;
>
> Try in your custom_decode
>
> if [ "$1" = "XXX" ] ; then "sudo /usr/bin/reboot" ; exit 1 ; fi
>
>
> ** Dave Parks **
> WB8ODF@... <mailto:WB8ODF@...>
> http://wb8odf.com
> /IRLP Node: 8139/
> /1-734-219-2010
> /
> /Correspondent Amateur Radio Newsline/
> <mailto:dave@...>
>
>
>
> On Monday, March 30, 2020, 2:33:46 PM EDT, Klaus Rung via Groups.Io
> <k_rung=yahoo.com@groups.io> wrote:
>
>
> Has anyone made a dtmf reboot script that can be executed over the
> link radio, or network card restart?
>
> Klaus
> ve3kr
> 2450
>




Klaus Rung
 

I cannot find a sudoers file in /etc

On Monday, March 30, 2020, 3:24:56 p.m. EDT, David Cameron - IRLP <dcameron@...> wrote:


You also have to add the user and command to the /etc/sudoers file (with
a NOPASSWD field) to allow the repeater user root access to run that
command:

# User privilege specification
root    ALL=(ALL:ALL) ALL
# ADD THIS LINE TO ALLOW repeater USER TO REBOOT
repeater     ALL=NOPASSWD:/sbin/reboot

Then, as repeater, try running

sudo /sbin/reboot

And see what happens. As all of my nodes are remote to here, and I don't
want to reboot them unless absolutely required, I can't really test this.

Dave Cameron

On 30/03/2020 12:14 p.m., Dave Parks - WB8ODF via Groups.Io wrote:
> Did you get it working?
>
>
> ** Dave Parks **
> WB8ODF@... <mailto:WB8ODF@...>
> http://wb8odf.com
> /IRLP Node: 8139/
> /1-734-219-2010
> /
> /Correspondent Amateur Radio Newsline/
> <mailto:dave@...>
>
>
>
> On Monday, March 30, 2020, 3:12:27 PM EDT, Klaus Rung via Groups.Io
> <k_rung=yahoo.com@groups.io> wrote:
>
>
> Boy, lot's of people have done this before, thanks for all the help
>
>
> On Monday, March 30, 2020, 2:52:33 p.m. EDT, Dave Parks - WB8ODF via
> Groups.Io <wb8odf=yahoo.com@groups.io> wrote:
>
>
> H Klaus;
>
> Try in your custom_decode
>
> if [ "$1" = "XXX" ] ; then "sudo /usr/bin/reboot" ; exit 1 ; fi
>
>
> ** Dave Parks **
> WB8ODF@... <mailto:WB8ODF@...>
> http://wb8odf.com
> /IRLP Node: 8139/
> /1-734-219-2010
> /
> /Correspondent Amateur Radio Newsline/
> <mailto:dave@...>
>
>
>
> On Monday, March 30, 2020, 2:33:46 PM EDT, Klaus Rung via Groups.Io
> <k_rung=yahoo.com@groups.io> wrote:
>
>
> Has anyone made a dtmf reboot script that can be executed over the
> link radio, or network card restart?
>
> Klaus
> ve3kr
> 2450
>




Klaus Rung
 

No not as yet.


On Monday, March 30, 2020, 3:14:45 p.m. EDT, Dave Parks - WB8ODF via Groups.Io <wb8odf@...> wrote:


Did you get it working?


** Dave Parks **
IRLP Node: 8139
1-734-219-2010
Correspondent Amateur Radio Newsline



On Monday, March 30, 2020, 3:12:27 PM EDT, Klaus Rung via Groups.Io <k_rung@...> wrote:


Boy, lot's of people have done this before, thanks for all the help


On Monday, March 30, 2020, 2:52:33 p.m. EDT, Dave Parks - WB8ODF via Groups.Io <wb8odf@...> wrote:


H Klaus;

Try in your custom_decode

if [ "$1" = "XXX" ] ; then "sudo /usr/bin/reboot" ; exit 1 ; fi


** Dave Parks **
IRLP Node: 8139
1-734-219-2010
Correspondent Amateur Radio Newsline



On Monday, March 30, 2020, 2:33:46 PM EDT, Klaus Rung via Groups.Io <k_rung@...> wrote:


Has anyone made a dtmf reboot script that can be executed over the link radio, or network card restart?

Klaus
ve3kr
2450


k9dc
 

sudo is not standard with IRLP Linux (it is on the Pi).

so first run the following

apt-get update
apt-get install sudo

THa you’ll have it./

-k9dc

On Mar 30, 2020, at 16:08, Klaus Rung via Groups.Io <k_rung=yahoo.com@groups.io> wrote:

I cannot find a sudoers file in /etc

On Monday, March 30, 2020, 3:24:56 p.m. EDT, David Cameron - IRLP <dcameron@...> wrote:


 

klaus,

If you are using Debian..

as user root

cd /etc

visudo (it's very Secret Squirrel)

that should allow you to edit sudoers


** Dave Parks **
IRLP Node: 8139
1-734-219-2010
Correspondent Amateur Radio Newsline



On Monday, March 30, 2020, 4:08:09 PM EDT, Klaus Rung via Groups.Io <k_rung@...> wrote:


I cannot find a sudoers file in /etc

On Monday, March 30, 2020, 3:24:56 p.m. EDT, David Cameron - IRLP <dcameron@...> wrote:


You also have to add the user and command to the /etc/sudoers file (with
a NOPASSWD field) to allow the repeater user root access to run that
command:

# User privilege specification
root    ALL=(ALL:ALL) ALL
# ADD THIS LINE TO ALLOW repeater USER TO REBOOT
repeater     ALL=NOPASSWD:/sbin/reboot

Then, as repeater, try running

sudo /sbin/reboot

And see what happens. As all of my nodes are remote to here, and I don't
want to reboot them unless absolutely required, I can't really test this.

Dave Cameron

On 30/03/2020 12:14 p.m., Dave Parks - WB8ODF via Groups.Io wrote:
> Did you get it working?
>
>
> ** Dave Parks **
> WB8ODF@... <mailto:WB8ODF@...>
> http://wb8odf.com
> /IRLP Node: 8139/
> /1-734-219-2010
> /
> /Correspondent Amateur Radio Newsline/
> <mailto:dave@...>
>
>
>
> On Monday, March 30, 2020, 3:12:27 PM EDT, Klaus Rung via Groups.Io
> <k_rung=yahoo.com@groups.io> wrote:
>
>
> Boy, lot's of people have done this before, thanks for all the help
>
>
> On Monday, March 30, 2020, 2:52:33 p.m. EDT, Dave Parks - WB8ODF via
> Groups.Io <wb8odf=yahoo.com@groups.io> wrote:
>
>
> H Klaus;
>
> Try in your custom_decode
>
> if [ "$1" = "XXX" ] ; then "sudo /usr/bin/reboot" ; exit 1 ; fi
>
>
> ** Dave Parks **
> WB8ODF@... <mailto:WB8ODF@...>
> http://wb8odf.com
> /IRLP Node: 8139/
> /1-734-219-2010
> /
> /Correspondent Amateur Radio Newsline/
> <mailto:dave@...>
>
>
>
> On Monday, March 30, 2020, 2:33:46 PM EDT, Klaus Rung via Groups.Io
> <k_rung=yahoo.com@groups.io> wrote:
>
>
> Has anyone made a dtmf reboot script that can be executed over the
> link radio, or network card restart?
>
> Klaus
> ve3kr
> 2450
>




Klaus Rung
 

Hey, now it works! Thanks guys for all the help.

Klaus


On Monday, March 30, 2020, 4:10:22 p.m. EDT, k9dc <dave@...> wrote:



sudo is not standard with IRLP Linux (it is on the Pi).

so first run the following

apt-get update
apt-get install sudo

THa you’ll have it./

-k9dc

> On Mar 30, 2020, at 16:08, Klaus Rung via Groups.Io <k_rung=yahoo.com@groups.io> wrote:
>
> I cannot find a sudoers file in /etc
>
> On Monday, March 30, 2020, 3:24:56 p.m. EDT, David Cameron - IRLP <dcameron@...> wrote:
>
>





Klaus Rung
 

So much new info, my head is starting to spin but great to get so much assistance.

Klaus

On Monday, March 30, 2020, 4:13:08 p.m. EDT, Dave Parks - WB8ODF via Groups.Io <wb8odf@...> wrote:


klaus,

If you are using Debian..

as user root

cd /etc

visudo (it's very Secret Squirrel)

that should allow you to edit sudoers


** Dave Parks **
IRLP Node: 8139
1-734-219-2010
Correspondent Amateur Radio Newsline



On Monday, March 30, 2020, 4:08:09 PM EDT, Klaus Rung via Groups.Io <k_rung@...> wrote:


I cannot find a sudoers file in /etc

On Monday, March 30, 2020, 3:24:56 p.m. EDT, David Cameron - IRLP <dcameron@...> wrote:


You also have to add the user and command to the /etc/sudoers file (with
a NOPASSWD field) to allow the repeater user root access to run that
command:

# User privilege specification
root    ALL=(ALL:ALL) ALL
# ADD THIS LINE TO ALLOW repeater USER TO REBOOT
repeater     ALL=NOPASSWD:/sbin/reboot

Then, as repeater, try running

sudo /sbin/reboot

And see what happens. As all of my nodes are remote to here, and I don't
want to reboot them unless absolutely required, I can't really test this.

Dave Cameron

On 30/03/2020 12:14 p.m., Dave Parks - WB8ODF via Groups.Io wrote:
> Did you get it working?
>
>
> ** Dave Parks **
> WB8ODF@... <mailto:WB8ODF@...>
> http://wb8odf.com
> /IRLP Node: 8139/
> /1-734-219-2010
> /
> /Correspondent Amateur Radio Newsline/
> <mailto:dave@...>
>
>
>
> On Monday, March 30, 2020, 3:12:27 PM EDT, Klaus Rung via Groups.Io
> <k_rung=yahoo.com@groups.io> wrote:
>
>
> Boy, lot's of people have done this before, thanks for all the help
>
>
> On Monday, March 30, 2020, 2:52:33 p.m. EDT, Dave Parks - WB8ODF via
> Groups.Io <wb8odf=yahoo.com@groups.io> wrote:
>
>
> H Klaus;
>
> Try in your custom_decode
>
> if [ "$1" = "XXX" ] ; then "sudo /usr/bin/reboot" ; exit 1 ; fi
>
>
> ** Dave Parks **
> WB8ODF@... <mailto:WB8ODF@...>
> http://wb8odf.com
> /IRLP Node: 8139/
> /1-734-219-2010
> /
> /Correspondent Amateur Radio Newsline/
> <mailto:dave@...>
>
>
>
> On Monday, March 30, 2020, 2:33:46 PM EDT, Klaus Rung via Groups.Io
> <k_rung=yahoo.com@groups.io> wrote:
>
>
> Has anyone made a dtmf reboot script that can be executed over the
> link radio, or network card restart?
>
> Klaus
> ve3kr
> 2450
>




Klaus Rung
 

When I run

sudo /sbin/reboot

as user repeater the node reboots fine but when I try to use the dtmf command it does not work.

if [ "$1" = "22" ] ; then "sudo /usr/bin/reboot" ; exit 1 ; fi

results below

repeater@stn2450:~/$ decode 22
/home/irlp/custom/custom_decode: line 7: sudo /usr/bin/reboot: No such file or directory
repeater@stn2450:~/$



On Monday, March 30, 2020, 4:10:22 p.m. EDT, k9dc <dave@...> wrote:



sudo is not standard with IRLP Linux (it is on the Pi).

so first run the following

apt-get update
apt-get install sudo

THa you’ll have it./

-k9dc

> On Mar 30, 2020, at 16:08, Klaus Rung via Groups.Io <k_rung=yahoo.com@groups.io> wrote:
>
> I cannot find a sudoers file in /etc
>
> On Monday, March 30, 2020, 3:24:56 p.m. EDT, David Cameron - IRLP <dcameron@...> wrote:
>
>





 

Klaus,

change;

if [ "$1" = "22" ] ; then "sudo /usr/bin/reboot" ; exit 1 ; fi

to

if [ "$1" = "22" ] ; then "sudo /sbin/reboot" ; exit 1 ; fi


** Dave Parks **
IRLP Node: 8139
1-734-219-2010
Correspondent Amateur Radio Newsline



On Monday, March 30, 2020, 4:34:18 PM EDT, Klaus Rung via Groups.Io <k_rung@...> wrote:


When I run

sudo /sbin/reboot

as user repeater the node reboots fine but when I try to use the dtmf command it does not work.

if [ "$1" = "22" ] ; then "sudo /usr/bin/reboot" ; exit 1 ; fi

results below

repeater@stn2450:~/$ decode 22
/home/irlp/custom/custom_decode: line 7: sudo /usr/bin/reboot: No such file or directory
repeater@stn2450:~/$



On Monday, March 30, 2020, 4:10:22 p.m. EDT, k9dc <dave@...> wrote:



sudo is not standard with IRLP Linux (it is on the Pi).

so first run the following

apt-get update
apt-get install sudo

THa you’ll have it./

-k9dc

> On Mar 30, 2020, at 16:08, Klaus Rung via Groups.Io <k_rung=yahoo.com@groups.io> wrote:
>
> I cannot find a sudoers file in /etc
>
> On Monday, March 30, 2020, 3:24:56 p.m. EDT, David Cameron - IRLP <dcameron@...> wrote:
>
>





Klaus Rung
 

I already tried that and it did not work.

root@stn2450:/home/irlp/custom# su - repeater
repeater@stn2450:~/$ decode 22
/home/irlp/custom/custom_decode: line 7: sudo /sbin/reboot: No such file or directory
repeater@stn2450:~/$

if [ "$1" = "22" ] ; then "sudo /sbin/reboot" ; exit 1 ; fi

If I use sudo  /sbin/reboot on the line as user repeater it works but not with the dtmf cmd


On Monday, March 30, 2020, 4:37:12 p.m. EDT, Dave Parks - WB8ODF via Groups.Io <wb8odf@...> wrote:


Klaus,

change;

if [ "$1" = "22" ] ; then "sudo /usr/bin/reboot" ; exit 1 ; fi

to

if [ "$1" = "22" ] ; then "sudo /sbin/reboot" ; exit 1 ; fi


** Dave Parks **
IRLP Node: 8139
1-734-219-2010
Correspondent Amateur Radio Newsline



On Monday, March 30, 2020, 4:34:18 PM EDT, Klaus Rung via Groups.Io <k_rung@...> wrote:


When I run

sudo /sbin/reboot

as user repeater the node reboots fine but when I try to use the dtmf command it does not work.

if [ "$1" = "22" ] ; then "sudo /usr/bin/reboot" ; exit 1 ; fi

results below

repeater@stn2450:~/$ decode 22
/home/irlp/custom/custom_decode: line 7: sudo /usr/bin/reboot: No such file or directory
repeater@stn2450:~/$



On Monday, March 30, 2020, 4:10:22 p.m. EDT, k9dc <dave@...> wrote:



sudo is not standard with IRLP Linux (it is on the Pi).

so first run the following

apt-get update
apt-get install sudo

THa you’ll have it./

-k9dc

> On Mar 30, 2020, at 16:08, Klaus Rung via Groups.Io <k_rung=yahoo.com@groups.io> wrote:
>
> I cannot find a sudoers file in /etc
>
> On Monday, March 30, 2020, 3:24:56 p.m. EDT, David Cameron - IRLP <dcameron@...> wrote:
>
>





Klaus Rung
 

Getting close but still something crucial missing here.

On Monday, March 30, 2020, 4:37:12 p.m. EDT, Dave Parks - WB8ODF via Groups.Io <wb8odf@...> wrote:


Klaus,

change;

if [ "$1" = "22" ] ; then "sudo /usr/bin/reboot" ; exit 1 ; fi

to

if [ "$1" = "22" ] ; then "sudo /sbin/reboot" ; exit 1 ; fi


** Dave Parks **
IRLP Node: 8139
1-734-219-2010
Correspondent Amateur Radio Newsline



On Monday, March 30, 2020, 4:34:18 PM EDT, Klaus Rung via Groups.Io <k_rung@...> wrote:


When I run

sudo /sbin/reboot

as user repeater the node reboots fine but when I try to use the dtmf command it does not work.

if [ "$1" = "22" ] ; then "sudo /usr/bin/reboot" ; exit 1 ; fi

results below

repeater@stn2450:~/$ decode 22
/home/irlp/custom/custom_decode: line 7: sudo /usr/bin/reboot: No such file or directory
repeater@stn2450:~/$



On Monday, March 30, 2020, 4:10:22 p.m. EDT, k9dc <dave@...> wrote:



sudo is not standard with IRLP Linux (it is on the Pi).

so first run the following

apt-get update
apt-get install sudo

THa you’ll have it./

-k9dc

> On Mar 30, 2020, at 16:08, Klaus Rung via Groups.Io <k_rung=yahoo.com@groups.io> wrote:
>
> I cannot find a sudoers file in /etc
>
> On Monday, March 30, 2020, 3:24:56 p.m. EDT, David Cameron - IRLP <dcameron@...> wrote:
>
>





David McAnally
 

How about...

if [ "$1" = "22" ] ; then "/usr/bin/sudo /sbin/reboot" ; exit 1 ; fi

cron may not have PATH set for commands.


On Mon, Mar 30, 2020 at 3:46 PM Klaus Rung via Groups.Io <k_rung=yahoo.com@groups.io> wrote:
I already tried that and it did not work.

root@stn2450:/home/irlp/custom# su - repeater
repeater@stn2450:~/$ decode 22
/home/irlp/custom/custom_decode: line 7: sudo /sbin/reboot: No such file or directory
repeater@stn2450:~/$

if [ "$1" = "22" ] ; then "sudo /sbin/reboot" ; exit 1 ; fi

If I use sudo  /sbin/reboot on the line as user repeater it works but not with the dtmf cmd


On Monday, March 30, 2020, 4:37:12 p.m. EDT, Dave Parks - WB8ODF via Groups.Io <wb8odf=yahoo.com@groups.io> wrote:


Klaus,

change;

if [ "$1" = "22" ] ; then "sudo /usr/bin/reboot" ; exit 1 ; fi

to

if [ "$1" = "22" ] ; then "sudo /sbin/reboot" ; exit 1 ; fi


** Dave Parks **
IRLP Node: 8139
1-734-219-2010
Correspondent Amateur Radio Newsline



On Monday, March 30, 2020, 4:34:18 PM EDT, Klaus Rung via Groups.Io <k_rung=yahoo.com@groups.io> wrote:


When I run

sudo /sbin/reboot

as user repeater the node reboots fine but when I try to use the dtmf command it does not work.

if [ "$1" = "22" ] ; then "sudo /usr/bin/reboot" ; exit 1 ; fi

results below

repeater@stn2450:~/$ decode 22
/home/irlp/custom/custom_decode: line 7: sudo /usr/bin/reboot: No such file or directory
repeater@stn2450:~/$



On Monday, March 30, 2020, 4:10:22 p.m. EDT, k9dc <dave@...> wrote:



sudo is not standard with IRLP Linux (it is on the Pi).

so first run the following

apt-get update
apt-get install sudo

THa you’ll have it./

-k9dc

> On Mar 30, 2020, at 16:08, Klaus Rung via Groups.Io <k_rung=yahoo.com@groups.io> wrote:
>
> I cannot find a sudoers file in /etc
>
> On Monday, March 30, 2020, 3:24:56 p.m. EDT, David Cameron - IRLP <dcameron@...> wrote:
>
>