Philipp's picture

Hi.

I have built a custom appliance, but do not want to have management tools like wemin, stunnel4 and shellinabox. Removing or disabling services afterwards with inithooks is not really an option for me.

How can I exclude some packages from being built?

Regards

Philipp

Forum: 
Jeremy Davis's picture

All the services you mentioned are packaged. Packages come from plans, so you just need to adjust the relevant plan(s) to remove the relevant packages you don't want.

All shared config scripts, overlays and plans are in common (local on TKLDev: /turnkey/fab/common). You can check which plans are applicable by checking the plan/main of your build code. The plan files are written in C style, so either remove the relevant lines altogether, or comment them by a line prefix of '//', or multi-line comments enclosed wtihin '/*' and '*/'.

To use the LAMP appliance plan as an example:

The first 2 lines include turnkey/base and turnkey/lamp.

As you can hopefully see, to remove Webmin, remove/comment out Webmin and it's dependencies. To find specific package,s try using grep recursively, e.g. to search for stunnel:

grep -R stunnel /turnkey/fab/common/plans

It's probably also worth noting that Webshell is also known as 'shellinabox'.

After rmeoving packages, you'll likely need/want to remove some conf scripts and overlays too (conf scripts that expect files from specific packages will fail; unrequited overlays, will likely just be cruft and probably won't cause issues).

I hope that all makes sense and gets you going in the right direction. Please post back to let us know how you go.

Philipp's picture

Hi Jeremy, works nearly perfect ;-)

When removing package "shellinabox", the script /turnkey/fab/common/conf/turnkey.d/shellinabox is executed. Fails due to missing shellinabox package.

What would be the best/correct way to disable this script? Just removing from filesystem?

Regards

Jeremy Davis's picture

Yeah I'd probably just remove it. Making it non-executable (i.e. 'chmod -x path/to/script') should work too, so is a possible alternative.

Add new comment