[util-yaml] make timers optional

This commit is contained in:
Philip Müller 2023-04-09 15:41:19 +07:00
parent 7cabd74e60
commit 8325693818

View file

@ -82,11 +82,13 @@ write_services_conf(){
echo ' mandatory: false' >> "$conf" echo ' mandatory: false' >> "$conf"
echo '' >> "$conf" echo '' >> "$conf"
done done
echo 'timers:' >> "$conf" if [ ! ${enable_systemd_timers[@]} -eq 0 ]; then
for s in ${enable_systemd_timers[@]}; do echo 'timers:' >> "$conf"
echo " - name: $s" >> "$conf" for s in ${enable_systemd_timers[@]}; do
echo ' mandatory: false' >> "$conf" echo " - name: $s" >> "$conf"
echo '' >> "$conf" echo ' mandatory: false' >> "$conf"
echo '' >> "$conf"
fi
done done
echo 'targets:' >> "$conf" echo 'targets:' >> "$conf"
echo ' - name: "graphical"' >> "$conf" echo ' - name: "graphical"' >> "$conf"