From a842de625860945acaedb8f7022560ba9551cc7b Mon Sep 17 00:00:00 2001 From: David Kozinn Date: Sat, 16 Dec 2023 16:38:07 +0000 Subject: [PATCH] More install fixes, correct nasajobsbot.timer --- install.sh | 7 ++++--- nasajobsbot.timer | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/install.sh b/install.sh index 9220ba0..292eba0 100755 --- a/install.sh +++ b/install.sh @@ -24,15 +24,16 @@ for service in $(cat services) do export service sudo -E bash -c "sed 's@USER@$user@;s@HOME@$user@' $service.service > $SYSTEM/$service.service" - sudo -E bash -c "[[ -f $service.timer ]] && cp $service.timer $SYSTEM" - sudo -E cp src/$service.py $BIN + [[ -f $service.timer ]] && sudo cp $service.timer $SYSTEM + sudo cp src/$service.py $BIN done -sudo -E bash -c "cp nasabot.logrotate $LOGDIR" +sudo cp nasabot.logrotate $LOGDIR sudo $SYSTEMCTL daemon-reload for service in $(cat services) do + [[ -f $service.timer ]] && service = $service.timer sudo $SYSTEMCTL enable $service sudo $SYSTEMCTL restart $service done diff --git a/nasajobsbot.timer b/nasajobsbot.timer index 084cef4..4edc265 100644 --- a/nasajobsbot.timer +++ b/nasajobsbot.timer @@ -6,7 +6,7 @@ Requires=nasajobsbot.service [Timer] Unit=nasajobsbot.service -OnCalendar=* *-*-* 06:00:00 +OnCalendar=*-*-* 06:00:00 [Install] WantedBy=timers.target \ No newline at end of file