NETGEAR is aware of a growing number of phone and online scams. To learn how to stay safe click here.
Forum Discussion
Dewdman42
Apr 15, 2016Virtuoso
how to get rid of Mysql systemctl
At some point I installed the MySQL addon and removed it later when I decided to use postgres. However, MySQL is still left running on my system and enabled as a systemctl service, even after reboot...
Dewdman42
Apr 15, 2016Virtuoso
Also I am trying to figure out how addons have their services added to systemctl. When I inspected the postgresql addon control postinst script, I see the following command:
event_push app readynasd '<add-s resource-type="LocalApp" resource-id="LocalApp"><LocalApp appname="postgresql-readynas" success="1" reboot="1"/></add-s>' 0 0
This seems to pass itself to readynasd for registration somewhere. Aside from that, the postinst script doesn't have any code to enable the systemd service unit. The .service file is there in the /apps/postgresql_readynas/ folder, and it gets moved into systemd, but not explicitly by this script. Does readynasd move .service files automatically from an /apps/<appname> dir when its present there? If so, does that only happen when this event_push is called? or something simillar? After that its entirely up to systemctl to start/stop or enable/disable the service....presuming there isn't also an init.d service redundantly doing something... Am I understanding things right?
siigna
Apr 15, 2016NETGEAR Employee Retired
That event_push command has actually been deprecated from the SDK and is no longer needed (SDK is being updated). It used to let readynasd know the install went OK, but it's taken care of automatically now.
/apps/PACKAGE/fvapp-PACKAGE.service is automatically copied over to /lib/systemd/system on install. The UI toggle starts and stops the systemd service.
- Dewdman42Apr 15, 2016Virtuoso
when you say its taken care of automatically now, what do you mean exactly? Are you saying that readynasd sweeps through the /apps dir and looks for .service files and copies them into /lib/systemd/system/ ?? how exactly do addon service files get propogated into systemd?
Basically I'm trying to find out where service unit files can reside that may get implictly added back to systemd and enabled. It sounds like if they are in an app's working dir, then this will be the case?
I really like systemd a lot better then the old init.d approach. systemd by itself is very clear and explicit . Init.d can be anybody's guess depending on what someone writes in the init.d script. I can understand why some legacy products will keep using init.d What isn't clear to me is why and how init.d works together with systemd.
- siignaApr 15, 2016NETGEAR Employee Retired
After an app is installed readynasd restarts the web server (apache2). Before the web server starts (ExecStartPre in its service file) /frontview/bin/fvapps is ran, which sweeps through the apps folder and copies service files over.
- Dewdman42Apr 15, 2016Virtuoso
got it. THANKS for the explanation.
Related Content
NETGEAR Academy
Boost your skills with the Netgear Academy - Get trained, certified and stay ahead with the latest Netgear technology!
Join Us!