APRX starts at boot

622 views
Skip to first unread message

kg4pid

unread,
Dec 26, 2014, 1:29:12 PM12/26/14
to aprx-s...@googlegroups.com

Why does APRX start aumatically? On page 56 of the APRX manual found here

http://repo.ham.fi/svn/aprx/trunk/doc/aprx-manual.pdf

5.1.2 On Debian/Ubuntu/derivatives

After doing installation on this type of machine either from pre-compiled binary package, or from sources:
In order to use package contained startup scripts, you will need to edit the /etc/default/aprx to contain following:
STARTAPRX="yes"
DAEMON_OPTS=""

My /etc/default/aprx file looks like this.
 
#
# STARTAPRX: start aprx on boot. Should be set to "yes" once you have
#            configured aprx.
#
STARTAPRX="no"

#
# Additional options that are passed to the Daemon.
#
DAEMON_OPTS=""

But yet it still starts up at a reboot even though I don't want it to.
I have a script that is run on a reboot and I want it to start APRX as the last step.
When I first started using APRX a couple of years ago it did not start automatically and I cannot find what starts it. Does anyone here know?

Max KG4PID

Paul VA3PAW

unread,
Jan 4, 2015, 4:52:39 PM1/4/15
to aprx-s...@googlegroups.com
Hi Max,

Unless your script that runs on a reboot actually starts APRX for you already, I would check /etc/rc.local first.

73! Paul VA3PAW

Liz

unread,
Jan 4, 2015, 5:35:03 PM1/4/15
to aprx-s...@googlegroups.com
Nothing in /etc/rc.local on a Debian derivative.

I can't tell you what starts aprx on your system, I use a manually run
script after startup.
Your script could be altered to stop aprx, and then restart it if you
can't find the culprit.

Liz
VK2XSE

kg4pid

unread,
Jan 4, 2015, 6:03:25 PM1/4/15
to aprx-s...@googlegroups.com
Nothing in /etc/rc.local on my system either. Yes, my script has to stop aprx and as the last step restart it. I wish I could find just where it gets started automatically at boot.

Mohd Hamid Misnan

unread,
Jan 4, 2015, 6:17:32 PM1/4/15
to aprx-s...@googlegroups.com
If you check the /etc/init.d/aprx script, I believe the parameter STARTAPRX is not being used anywhere and this doesn't stop the aprx to start. You may want to modified the init script to check for the parameter and only start the process when it is set to yes.

73,
Hamid/9M2TPT

--
You received this message because you are subscribed to the Google Groups "Aprx software" group.
To unsubscribe from this group and stop receiving emails from it, send an email to aprx-softwar...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Paul VA3PAW

unread,
Jan 4, 2015, 10:08:44 PM1/4/15
to aprx-s...@googlegroups.com
Hi Max,

In your reboot script, just to be absolutely sure, you may want to add some logging to some text file (e.g. echo $date >> /home/max/max.log).
This will ensure that it doesn't run accidentally aprx at startup for you....

Also, as a last resort, you can try finding a script which has a reference to aprx and so potentially runs it:

sudo grep 'aprx' -RinH /etc/*

This will display all files where 'aprx' word comes up along with a line number of occurrence and contents of the line. 
There will be lots of files.

73! Paul VA3PAW

kg4pid

unread,
Jan 5, 2015, 12:19:36 PM1/5/15
to aprx-s...@googlegroups.com
I ran the command "sudo grep 'aprx' -RinH /etc/*" and yes, it did return a bunch of files. I'll try to go through them as time permits. Thanks for the pointer.

Max KG4PID

James Lyles

unread,
Jan 24, 2015, 8:03:06 PM1/24/15
to aprx-s...@googlegroups.com
I am having the same issue of APRX starting at reboot when I don't have a script enabled. I just did a clean install of aprx: 2.8.1-W6KWF-7-g777ce75
on a clean Rasparian Pi and the /etc/default/aprx file is below. Even with this file set to not start the program it is running at startup. I also checked "ps aux" right after bootup and pasted a section of the results below. It seems like whatever is booting aprx is starting 2 instances of it; process 2089 and 2140 in the list below.

It would be nice to know what is causing the behavior. However, since I want it to start with reboot anyway, its a nice hack :)

Thanks,

james

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

#
# STARTAPRX: start aprx on boot. Should be set to "yes" once you have
#            configured aprx.
#
STARTAPRX="no"

#
# Additional options that are passed to the Daemon.
#
DAEMON_OPTS=""
--------------------------------------------------
root      2011  0.1  0.0      0     0 ?        S    19:54   0:00 [kworker/0:2]
root      2017  0.0  0.0      0     0 ?        S    19:54   0:00 [kworker/0:3]
root      2050  0.0  0.3  27980  1560 ?        Sl   19:54   0:00 /usr/sbin/rsysl
root      2089  0.0  0.1   2556   628 ?        Ss   19:54   0:00 /usr/sbin/aprx
root      2115  0.0  0.1   4284   804 ?        Ss   19:54   0:00 /usr/sbin/cron
root      2140  0.0  0.1   2764   864 ?        S    19:54   0:00 /usr/sbin/aprx
104       2160  0.0  0.1   3184   620 ?        Ss   19:54   0:00 /usr/bin/dbus-d
ntp       2200  0.0  0.3   5524  1660 ?        Ss   19:54   0:00 /usr/sbin/ntpd
root      2201  0.0  0.4   4904  2000 ?        Ss   19:54   0:00 dhclient -v -pf
nobody    2268  0.0  0.1   2024   644 ?        Ss   19:54   0:00 /usr/sbin/thd -
root      2270  0.0  0.2   6224  1068 ?        Ss   19:54   0:00 /usr/sbin/sshd
root      2299  0.0  0.1   4232   820 tty1     Ss+  19:54   0:00 /sbin/getty --n


Mohd Hamid Misnan

unread,
Jan 25, 2015, 7:11:08 PM1/25/15
to aprx-s...@googlegroups.com
Hi,

If you don’t really need it to start automatically at boot up time, you can always remove the service from the auto startup directory. The easiest to remove it is by issuing the following command:

$ sudo update-rc.d aprx remove

This will remove the links made to the run-level directories inside /etc/rcX.d (X = runlevel number). 

To add back the service, you can just issue the following command:

$ sudo update-rc.d aprx default

BTW, as per my reply to previous post on the same issue, the STARTAPRX variable is not checked in the /etc/init.d/aprx script, hence, this variable is useless. 

If you really need this variable to be checked, just add the following line into your /etc/init.d/aprx script, inside the do_start routine just before it calls up the start-stop-daemon.

[ "$STARTAPRX" !=  "yes" ] && return 2

Hope the above helps.

73,
Hamid/9M2TPT


Kenneth Finnegan

unread,
Jan 25, 2015, 8:15:58 PM1/25/15
to aprx-s...@googlegroups.com
My apologies for not having time to follow up with this earlier. Life
post-graduation has been a little crazy (anyone hiring engineers in
the Silicon Valley?)

Hamid is correct; STARTAPRX was never checked. The fix has been
applied to my branch here:
https://github.com/PhirePhly/aprx/commit/e934aaf6fc668801ab9193947b51606686472066

Putting together build-systems or getting cross-compile working is on
my wish list, so I will eventually start releasing 2.8.1-W6KWF-N
debs...
--
Kenneth Finnegan, W6KWF
http://blog.thelifeofkenneth.com/

Liz

unread,
Jan 26, 2015, 4:19:42 AM1/26/15
to aprx-s...@googlegroups.com
On Mon, 26 Jan 2015 11:11:03 +1100
Mohd Hamid Misnan <9m2...@gmail.com> wrote:

> Hi,
>
> If you don’t really need it to start automatically at boot up time,
> you can always remove the service from the auto startup directory.
> The easiest to remove it is by issuing the following command:
>
> $ sudo update-rc.d aprx remove
>
> This will remove the links made to the run-level directories
> inside /etc/rcX.d (X = runlevel number).
>
> To add back the service, you can just issue the following command:
>
> $ sudo update-rc.d aprx default
>
> BTW, as per my reply to previous post on the same issue, the
> STARTAPRX variable is not checked in the /etc/init.d/aprx script,
> hence, this variable is useless.
>
> If you really need this variable to be checked, just add the
> following line into your /etc/init.d/aprx script, inside the do_start
> routine just before it calls up the start-stop-daemon.
>
> [ "$STARTAPRX" != "yes" ] && return 2
>
> Hope the above helps.
>
> 73,
> Hamid/9M2TPT
>

Thanks Hamid. I'm not a Debian expert, but a many-year Debian user. I
expect only services to be started in /etc/rcX.d/ because /etc/default/program adds it to /etc/rcX.d/

I think a few of us had the same expectation, but we may not be really
correct, and Raspbian is not Debian either.

Can you point us to a place which explains this better?

Liz
VK2XSE
I expect additional programmes to be started through

Mohd Hamid Misnan

unread,
Jan 26, 2015, 5:02:41 AM1/26/15
to aprx-s...@googlegroups.com
The services was put in place I believe by the installer, when you installed the .deb package, it will 
do the necessary things including perhaps running the update-rc.d script. The /etc/default/aprx just 
contains a configuration, and as per my email before, the variable is not being used in the init script,
hence, it does nothing. I’m not an expert in the installer, my experience in compiling aprx only 
limited with the openwrt’s package. 

Can you point us to a place which explains this better?


I believe Matti might be able to shed some light on this one. 

73,
Hamid/9M2TPT

Liz

unread,
Mar 23, 2015, 7:32:51 AM3/23/15
to aprx-s...@googlegroups.com
On Mon, 26 Jan 2015 11:11:03 +1100
Mohd Hamid Misnan <9m2...@gmail.com> wrote:

> Hi,
>
> If you don’t really need it to start automatically at boot up time,
> you can always remove the service from the auto startup directory.
> The easiest to remove it is by issuing the following command:
>
> $ sudo update-rc.d aprx remove
>
> This will remove the links made to the run-level directories
> inside /etc/rcX.d (X = runlevel number).
>
> To add back the service, you can just issue the following command:
>
> $ sudo update-rc.d aprx default
>
> BTW, as per my reply to previous post on the same issue, the
> STARTAPRX variable is not checked in the /etc/init.d/aprx script,
> hence, this variable is useless.
>
> If you really need this variable to be checked, just add the
> following line into your /etc/init.d/aprx script, inside the do_start
> routine just before it calls up the start-stop-daemon.
>
> [ "$STARTAPRX" != "yes" ] && return 2
>
> Hope the above helps.
>
> 73,
> Hamid/9M2TPT


trying this right now
my BBB didn't have ax25 and mkiss in the kernel or as modules
so still trying to get the BBB going after I borked the RPi with an
upgrade to 3.16 (it doesn't boot)

Liz
VK2XSE
Reply all
Reply to author
Forward
0 new messages