diff --git a/system/systemd/plugin.d/systemd.plugin b/system/systemd/plugin.d/systemd.plugin
index bda5f68..e319e1f 100644
--- a/system/systemd/plugin.d/systemd.plugin
+++ b/system/systemd/plugin.d/systemd.plugin
@@ -20,9 +20,12 @@ plugin_systemd_configure()
if [ -d $SCRIPT_DIRECTORY/systemd.d ]; then
cd $SCRIPT_DIRECTORY/systemd.d
-
SERVICES=$(ls -1)
+ elif [ -n "$SYSTEMD_UNITS" ]; then
+ SERVICES=$SYSTEMD_UNITS
+ fi
+ if [ -n "$SERVICES" ]; then
for SERVICE in $SERVICES; do
# don't ask for '@' services - these should always be installed but
# never linked directly. Also ask for new or renamed services.
@@ -34,7 +37,7 @@ plugin_systemd_configure()
fi
continue
fi
- message "${MESSAGE_COLOR}$SERVICE: $(grep Description= $SERVICE | cut -d= -f2-)${DEFAULT_COLOR}"
+ message "${MESSAGE_COLOR}$SERVICE: $([ -f $SERVICE ] && grep Description= $SERVICE | cut -d= -f2-)${DEFAULT_COLOR}"
if query "Invoke $SERVICE via systemd automatically at boot ?" y
then
SYSTEMD_SERVICES+=" $SERVICE"
{"html5":"htmlmixed","css":"css","javascript":"javascript","php":"php","python":"python","ruby":"ruby","lua":"text\/x-lua","bash":"text\/x-sh","go":"go","c":"text\/x-csrc","cpp":"text\/x-c++src","diff":"diff","latex":"stex","sql":"sql","xml":"xml","apl":"apl","asterisk":"asterisk","c_loadrunner":"text\/x-csrc","c_mac":"text\/x-csrc","coffeescript":"text\/x-coffeescript","csharp":"text\/x-csharp","d":"d","ecmascript":"javascript","erlang":"erlang","groovy":"text\/x-groovy","haskell":"text\/x-haskell","haxe":"text\/x-haxe","html4strict":"htmlmixed","java":"text\/x-java","java5":"text\/x-java","jquery":"javascript","mirc":"mirc","mysql":"sql","ocaml":"text\/x-ocaml","pascal":"text\/x-pascal","perl":"perl","perl6":"perl","plsql":"sql","properties":"text\/x-properties","q":"text\/x-q","scala":"scala","scheme":"text\/x-scheme","tcl":"text\/x-tcl","vb":"text\/x-vb","verilog":"text\/x-verilog","yaml":"text\/x-yaml","z80":"text\/x-z80"}