mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-28 13:16:41 +00:00
config: handle multiple WantedBy targets in enable_service
This commit is contained in:
parent
1e3a6b12bf
commit
06cfa30851
@ -224,11 +224,13 @@ enable_service () {
|
|||||||
local target_dir=$INSTALL
|
local target_dir=$INSTALL
|
||||||
|
|
||||||
[ -f "$target_dir/$unit_dir/$unit" ] || exit 1
|
[ -f "$target_dir/$unit_dir/$unit" ] || exit 1
|
||||||
[ -z "$target" ] && target=`grep '^WantedBy' $target_dir/$unit_dir/$unit | cut -f2 -d=`
|
if [ -z "$target" ] ; then
|
||||||
|
for target in `grep '^WantedBy' $target_dir/$unit_dir/$unit | cut -f2 -d=` ; do
|
||||||
if [ -n "$target" ]; then
|
if [ -n "$target" ]; then
|
||||||
mkdir -p ${target_dir}/$unit_dir/${target}.wants
|
mkdir -p ${target_dir}/$unit_dir/${target}.wants
|
||||||
ln -sf ../${unit} ${target_dir}/$unit_dir/${target}.wants/
|
ln -sf ../${unit} ${target_dir}/$unit_dir/${target}.wants/
|
||||||
|
fi
|
||||||
|
done
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user