Remove unused units

Signed-off-by: Harsh Shandilya <msfjarvis@gmail.com>
This commit is contained in:
Harsh Shandilya 2019-08-14 22:29:29 +05:30
parent 0ea4788a1e
commit 99f807dd3d
No known key found for this signature in database
GPG key ID: C2E74282C2133D62
3 changed files with 1 additions and 51 deletions

View file

@ -8,8 +8,7 @@ function prettyPrint {
}
# Grab all service names
declare -a services=('androidx-release-watcher' 'caddy' 'gitea' 'horbiswalls-bot' 'mirror-bot' 'mirror-bot-2' 'uno-bot' 'walls-bot' 'walls-bot-2')
declare -a timers=('release-watcher-recent')
declare -a services=('caddy' 'gitea' 'horbiswalls-bot' 'mirror-bot' 'mirror-bot-2' 'uno-bot' 'walls-bot' 'walls-bot-2')
# Now loop through each service and install it
for service in "${services[@]}"; do
@ -26,18 +25,3 @@ for service in "${services[@]}"; do
sudo systemctl enable "${service}"
fi
done
for timer in "${timers[@]}"; do
if [ "${1}" ] && [[ "${timer}" != "${1}" && "${timer}.timer" != "${1}" ]]; then
continue
fi
prettyPrint "Installing ${timer}"
sudo cp -v "${timer}.timer" /etc/systemd/system/
sudo systemctl daemon-reload
prettyPrint "Restarting ${timer}"
sudo systemctl restart "${timer}".timer
if [ ! -f "/etc/systemd/system/multi-user.target.wants/${timer}.timer" ]; then
prettyPrint "Enabling ${timer}"
sudo systemctl enable "${timer}".timer
fi
done