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

@ -1,22 +0,0 @@
[Unit]
Description=Telegram notifier service for androidx-release-watcher
Wants=release-watcher-recent.timer
[Service]
WorkingDirectory=/home/bot/androidx-release-watcher
ExecStart=/home/bot/androidx-release-watcher/venv/bin/python telegram_notifier.py
; Use graceful shutdown with a reasonable timeout
KillMode=mixed
KillSignal=SIGQUIT
TimeoutStopSec=5s
; Use private /tmp and /var/tmp, which are discarded after the process stops.
PrivateTmp=true
; Use a minimal /dev (May bring additional security if switched to 'true', but it may not work on Raspberry Pi's or other devices, so it has been disabled in this dist.)
PrivateDevices=false
; Make /usr, /boot, /etc and possibly some more folders read-only.
ProtectSystem=full
[Install]
WantedBy=multi-user.target

View file

@ -1,12 +0,0 @@
[Unit]
Description=Run shopify-recent every 24 hours with a 30 minute leeway
Requires=androidx-release-watcher.service
[Timer]
Unit=androidx-release-watcher.service
OnUnitInactiveSec=24h
RandomizedDelaySec=15m
AccuracySec=1s
[Install]
WantedBy=timers.target

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