-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathservices.sh
More file actions
executable file
·43 lines (38 loc) · 945 Bytes
/
Copy pathservices.sh
File metadata and controls
executable file
·43 lines (38 loc) · 945 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#! /usr/bin/env bash
newline() { echo ""; }
user=$(whoami)
SERVICES=(
"NetworkManager"
"bluetooth"
"ly"
"paccache"
"reflector"
"auto-cpufreq"
"sshd"
"syncthing@${user}"
)
# Enable services
echo "Configuring systemd services..."
for service in "${SERVICES[@]}"; do
if ! systemctl is-enabled "$service" &>/dev/null; then
newline
echo "Enabling $service..."
sudo systemctl enable "$service"
else
echo "$service is already enabled"
fi
done
newline
echo "Configuring user systemd services"
if ! systemctl --user is-enabled "wallchange.timer" &>/dev/null; then
echo "Enabling wallchange.timer..."
if [ -d "./wallchange" ]; then
mkdir -p "$HOME/.config/systemd/user"
cp ./wallchange/* "$HOME/.config/systemd/user/"
systemctl --user enable wallchange.timer
else
echo "No wallchange directory found. Skipping user services setup."
fi
else
echo "wallchange.timer is already enabled"
fi