Skip to content

Commit

Permalink
Update klipper-backup-on-boot.service (#116)
Browse files Browse the repository at this point in the history
Bug fix: add -c parameter to essential files
  • Loading branch information
Staubgeborener authored Aug 9, 2024
1 parent 260b84f commit 4632104
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions install-files/klipper-backup-on-boot.service
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Wants=
[Service]
User=
Type=oneshot
ExecStart=/usr/bin/env bash -c "/usr/bin/env bash $HOME/klipper-backup/script.sh \"New Backup on boot - $(date +\"%%x - %%X\")\""
ExecStart=/usr/bin/env bash -c "/usr/bin/env bash $HOME/klipper-backup/script.sh -c \"New Backup on boot - $(date +\"%%x - %%X\")\""

[Install]
WantedBy=default.target
WantedBy=default.target
2 changes: 1 addition & 1 deletion install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,7 @@ install_cron() {
loading_pid=$!
(
crontab -l 2>/dev/null
echo "0 */4 * * * $HOME/klipper-backup/script.sh \"Cron backup - \$(date +\"%x - %X\")\""
echo "0 */4 * * * $HOME/klipper-backup/script.sh -c \"Cron backup - \$(date +\"%x - %X\")\""
) | crontab -
sleep .5
kill $loading_pid
Expand Down
2 changes: 1 addition & 1 deletion utils/filewatch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,5 @@ while read -r path event file; do
file=$(basename "$path")
fi
echo "Event Type: $event, Watched Path: $path, File Name: $file"
file="$file" /usr/bin/env bash -c "/usr/bin/env bash $HOME/klipper-backup/script.sh \"\$file modified - \$(date +'%x - %X')\"" > /dev/null 2>&1
file="$file" /usr/bin/env bash -c "/usr/bin/env bash $HOME/klipper-backup/script.sh -c \"\$file modified - \$(date +'%x - %X')\"" > /dev/null 2>&1
done

0 comments on commit 4632104

Please sign in to comment.