This repository has been archived on 2024-11-03. You can view files and clone it, but cannot push or open issues or pull requests.
2023-08-28 22:56:39 +01:00
|
|
|
#!/bin/sh
|
|
|
|
|
2023-10-29 15:34:13 +00:00
|
|
|
if [ -e /etc/runit/runsvdir/default ]; then
|
|
|
|
:
|
|
|
|
else
|
|
|
|
mkdir -p /etc/runit/runsvdir/default
|
|
|
|
fi
|
|
|
|
|
2023-08-28 22:56:39 +01:00
|
|
|
for i in $(ls /etc/sv/); do
|
2023-10-24 11:51:06 +01:00
|
|
|
rm -f /etc/dinit.d/boot.d/runitb.d
|
2023-08-28 22:56:39 +01:00
|
|
|
mkdir -p /etc/dinit.d/runitb.d/"$i"
|
|
|
|
cp -r /etc/sv/"$i"/* /etc/dinit.d/runitb.d/"$i"/
|
|
|
|
rm -rf /etc/dinit.d/runitb.d/"$i"/supervise
|
|
|
|
if [[ -x /etc/dinit.d/runitb.d/"$i"/log ]]; then
|
|
|
|
rm -rf /etc/dinit.d/runitb.d/"$i"/log/supervise
|
|
|
|
printf "type = process \nworking-dir = /etc/dinit.d/runitb.d/"$i"/log/ \ncommand = /etc/dinit.d/runitb.d/"$i"/log/run" > /etc/dinit.d/"$i"-log
|
|
|
|
fi
|
2023-09-11 07:22:17 +01:00
|
|
|
printf "type = process \nworking-dir = /etc/dinit.d/runitb.d/"$i"/ \nwaits-for = loginready \ncommand = /etc/dinit.d/runitb.d/"$i"/run" > /etc/dinit.d/"$i"
|
2023-08-28 22:56:39 +01:00
|
|
|
done
|
|
|
|
|
|
|
|
for i in $(ls /etc/runit/runsvdir/default/); do
|
|
|
|
ln -sf /etc/dinit.d/"$i" /etc/dinit.d/boot.d/
|
|
|
|
done
|
2023-10-29 15:34:13 +00:00
|
|
|
|
|
|
|
rm -rf /etc/dinit.d/boot.d/runitb.d
|