You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
381 B
20 lines
381 B
#!/bin/bash
|
|
|
|
set -Eeuo pipefail
|
|
|
|
. common.env
|
|
|
|
for unit in "${UNITS[@]}"; do
|
|
echo "Installing $unit..."
|
|
sudo cp -r --preserve=mode "$unit" "/etc/systemd/system/$unit"
|
|
done
|
|
|
|
echo "Reloading systemd..."
|
|
sudo systemctl daemon-reload
|
|
|
|
for unit in "${UNITS[@]}"; do
|
|
if grep -Fqx '[Install]' "$unit"; then
|
|
echo "Installing $unit..."
|
|
sudo systemctl enable "$unit"
|
|
fi
|
|
done
|
|
|