mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-24 11:16:51 +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
|
||||
|
||||
[ -f "$target_dir/$unit_dir/$unit" ] || exit 1
|
||||
[ -z "$target" ] && target=`grep '^WantedBy' $target_dir/$unit_dir/$unit | cut -f2 -d=`
|
||||
|
||||
if [ -n "$target" ]; then
|
||||
mkdir -p ${target_dir}/$unit_dir/${target}.wants
|
||||
ln -sf ../${unit} ${target_dir}/$unit_dir/${target}.wants/
|
||||
if [ -z "$target" ] ; then
|
||||
for target in `grep '^WantedBy' $target_dir/$unit_dir/$unit | cut -f2 -d=` ; do
|
||||
if [ -n "$target" ]; then
|
||||
mkdir -p ${target_dir}/$unit_dir/${target}.wants
|
||||
ln -sf ../${unit} ${target_dir}/$unit_dir/${target}.wants/
|
||||
fi
|
||||
done
|
||||
fi
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user