From e891196e364a8a48b02cd58c188deceda3e50d01 Mon Sep 17 00:00:00 2001
From: HGEpro <tstudio2007@gmail.com>
Date: Wed, 30 Mar 2022 19:41:47 +0200
Subject: [PATCH] fixed bug in installation scripts

---
 scripts/install.sh   | 2 +-
 scripts/uninstall.sh | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/scripts/install.sh b/scripts/install.sh
index b1981b4..a9fd674 100755
--- a/scripts/install.sh
+++ b/scripts/install.sh
@@ -68,7 +68,7 @@ if [ $daemon = "y" ]; then
                 echo "The daemon is already in crontab"
             else
                 echo "Adding the daemon to crontab..."
-                crontab -l > crontab.tmp
+                crontab -l >> crontab.tmp
                 echo "@reboot /usr/bin/librehomeworkd" >> crontab.tmp
                 crontab crontab.tmp
                 rm crontab.tmp
diff --git a/scripts/uninstall.sh b/scripts/uninstall.sh
index 52b9d8d..854f3b4 100755
--- a/scripts/uninstall.sh
+++ b/scripts/uninstall.sh
@@ -6,10 +6,10 @@ if [ $continue = "y" ]; then
 
     if crontab -l | grep -q "/usr/bin/librehomeworkd"; then
         echo "The daemon is in crontab, removing it..."
-        crontab -l > crontab.tmp
+        crontab -l >> crontab.tmp
 
         line=$(grep -n 'librehomeworkd' crontab.tmp)
-        sed ${line:0:1}d cron.tmp > _crontab.tmp
+        sed ${line:0:1}d crontab.tmp > _crontab.tmp
 
         crontab -r
         crontab _crontab.tmp
-- 
GitLab