Thanks for that reply.
I am new to Raspberry Pi/Linux and not familiar with systemd. I will need sometime to investigate.
I am curious though that as to why systemd might overcome the problem of my script stalling if it appears to have nothing wrong with it?
Update to reply given above##
Yesterday I left the script running and did not exit. When I took a look just now, I can see that the script is not actually stalling or hanging but it is continuing to run, by continuing to check for changes on the remote drive. Surely this isn't the only way the rclone command should work? Is there not a flag to tell it once it has completed the mount successfully, it should exit its operation and not continue to check for changes?
Is it perhaps the --vfs-cache flag that is causing this to happen?
2024/10/17 12:56:55 DEBUG : OneDrive root '': Checking for changes on remote
2024/10/17 12:56:55 INFO : vfs cache: cleaned: objects 0 (was 0) in use 0, to upload 0, uploading 0, total size 0 (was 0)
2024/10/17 12:57:55 DEBUG : OneDrive root '': Checking for changes on remote
2024/10/17 12:57:55 INFO : vfs cache: cleaned: objects 0 (was 0) in use 0, to upload 0, uploading 0, total size 0 (was 0)
2024/10/17 12:58:55 DEBUG : OneDrive root '': Checking for changes on remote
2024/10/17 12:58:55 INFO : vfs cache: cleaned: objects 0 (was 0) in use 0, to upload 0, uploading 0, total size 0 (was 0)
2024/10/17 12:59:55 DEBUG : OneDrive root '': Checking for changes on remote
2024/10/17 12:59:55 INFO : vfs cache: cleaned: objects 0 (was 0) in use 0, to upload 0, uploading 0, total size 0 (was 0)
2024/10/17 13:00:55 DEBUG : OneDrive root '': Checking for changes on remote
2024/10/17 13:00:55 INFO : vfs cache: cleaned: objects 0 (was 0) in use 0, to upload 0, uploading 0, total size 0 (was 0)
2024/10/17 13:01:55 DEBUG : OneDrive root '': Checking for changes on remote
2024/10/17 13:01:55 INFO : vfs cache: cleaned: objects 0 (was 0) in use 0, to upload 0, uploading 0, total size 0 (was 0)
2024/10/17 13:02:55 DEBUG : OneDrive root '': Checking for changes on remote
2024/10/17 13:02:55 INFO : vfs cache: cleaned: objects 0 (was 0) in use 0, to upload 0, uploading 0, total size 0 (was 0)
2024/10/17 13:03:55 DEBUG : OneDrive root '': Checking for changes on remote
2024/10/17 13:03:55 INFO : vfs cache: cleaned: objects 0 (was 0) in use 0, to upload 0, uploading 0, total size 0 (was 0)
2024/10/17 13:04:55 DEBUG : OneDrive root '': Checking for changes on remote
2024/10/17 13:04:55 INFO : vfs cache: cleaned: objects 0 (was 0) in use 0, to upload 0, uploading 0, total size 0 (was 0)
2024/10/17 13:05:55 DEBUG : OneDrive root '': Checking for changes on remote
2024/10/17 13:05:55 INFO : vfs cache: cleaned: objects 0 (was 0) in use 0, to upload 0, uploading 0, total size 0 (was 0)
2024/10/17 13:06:55 DEBUG : OneDrive root '': Checking for changes on remote
2024/10/17 13:06:55 INFO : vfs cache: cleaned: objects 0 (was 0) in use 0, to upload 0, uploading 0, total size 0 (was 0)
2024/10/17 13:07:55 DEBUG : OneDrive root '': Checking for changes on remote
2024/10/17 13:07:55 INFO : vfs cache: cleaned: objects 0 (was 0) in use 0, to upload 0, uploading 0, total size 0 (was 0)
2024/10/17 13:08:55 DEBUG : OneDrive root '': Checking for changes on remote
2024/10/17 13:08:55 INFO : vfs cache: cleaned: objects 0 (was 0) in use 0, to upload 0, uploading 0, total size 0 (was 0)
2024/10/17 13:09:55 DEBUG : OneDrive root '': Checking for changes on remote
2024/10/17 13:09:55 INFO : vfs cache: cleaned: objects 0 (was 0) in use 0, to upload 0, uploading 0, total size 0 (was 0)
2024/10/17 13:10:55 DEBUG : OneDrive root '': Checking for changes on remote
2024/10/17 13:10:55 INFO : vfs cache: cleaned: objects 0 (was 0) in use 0, to upload 0, uploading 0, total size 0 (was 0)
2024/10/17 13:11:55 DEBUG : OneDrive root '': Checking for changes on remote
2024/10/17 13:11:55 INFO : vfs cache: cleaned: objects 0 (was 0) in use 0, to upload 0, uploading 0, total size 0 (was 0)
2024/10/17 13:12:55 DEBUG : OneDrive root '': Checking for changes on remote
2024/10/17 13:12:55 INFO : vfs cache: cleaned: objects 0 (was 0) in use 0, to upload 0, uploading 0, total size 0 (was 0)
2024/10/17 13:13:55 DEBUG : OneDrive root '': Checking for changes on remote
2024/10/17 13:13:55 INFO : vfs cache: cleaned: objects 0 (was 0) in use 0, to upload 0, uploading 0, total size 0 (was 0)
2024/10/17 13:14:55 DEBUG : OneDrive root '': Checking for changes on remote
2024/10/17 13:14:55 INFO : vfs cache: cleaned: objects 0 (was 0) in use 0, to upload 0, uploading 0, total size 0 (was 0)
2024/10/17 13:15:55 DEBUG : OneDrive root '': Checking for changes on remote
2024/10/17 13:15:55 INFO : vfs cache: cleaned: objects 0 (was 0) in use 0, to upload 0, uploading 0, total size 0 (was 0)
2024/10/17 13:16:55 DEBUG : OneDrive root '': Checking for changes on remote
2024/10/17 13:16:55 INFO : vfs cache: cleaned: objects 0 (was 0) in use 0, to upload 0, uploading 0, total size 0 (was 0)
2024/10/17 13:17:55 DEBUG : OneDrive root '': Checking for changes on remote
2024/10/17 13:17:55 INFO : vfs cache: cleaned: objects 0 (was 0) in use 0, to upload 0, uploading 0, total size 0 (was 0)
2024/10/17 13:18:55 DEBUG : OneDrive root '': Checking for changes on remote
2024/10/17 13:18:55 INFO : vfs cache: cleaned: objects 0 (was 0) in use 0, to upload 0, uploading 0, total size 0 (was 0)
2024/10/17 13:19:55 DEBUG : OneDrive root '': Checking for changes on remote
2024/10/17 13:19:55 INFO : vfs cache: cleaned: objects 0 (was 0) in use 0, to upload 0, uploading 0, total size 0 (was 0)
2024/10/17 13:20:55 DEBUG : OneDrive root '': Checking for changes on remote
2024/10/17 13:20:55 INFO : vfs cache: cleaned: objects 0 (was 0) in use 0, to upload 0, uploading 0, total size 0 (was 0)
2024/10/17 13:21:55 DEBUG : OneDrive root '': Checking for changes on remote
2024/10/17 13:21:55 INFO : vfs cache: cleaned: objects 0 (was 0) in use 0, to upload 0, uploading 0, total size 0 (was 0)
2024/10/17 13:22:55 DEBUG : OneDrive root '': Checking for changes on remote
2024/10/17 13:22:55 INFO : vfs cache: cleaned: objects 0 (was 0) in use 0, to upload 0, uploading 0, total size 0 (was 0)
2024/10/17 13:23:55 DEBUG : OneDrive root '': Checking for changes on remote
2024/10/17 13:23:55 INFO : vfs cache: cleaned: objects 0 (was 0) in use 0, to upload 0, uploading 0, total size 0 (was 0)
2024/10/17 13:24:55 DEBUG : OneDrive root '': Checking for changes on remote
2024/10/17 13:24:55 INFO : vfs cache: cleaned: objects 0 (was 0) in use 0, to upload 0, uploading 0, total size 0 (was 0)
2024/10/17 13:25:55 DEBUG : OneDrive root '': Checking for changes on remote
2024/10/17 13:25:55 INFO : vfs cache: cleaned: objects 0 (was 0) in use 0, to upload 0, uploading 0, total size 0 (was 0)
2024/10/17 13:26:55 DEBUG : OneDrive root '': Checking for changes on remote
2024/10/17 13:26:55 INFO : vfs cache: cleaned: objects 0 (was 0) in use 0, to upload 0, uploading 0, total size 0 (was 0)
2024/10/17 13:27:55 DEBUG : OneDrive root '': Checking for changes on remote
2024/10/17 13:27:55 INFO : vfs cache: cleaned: objects 0 (was 0) in use 0, to upload 0, uploading 0, total size 0 (was 0)
2024/10/17 13:28:55 DEBUG : OneDrive root '': Checking for changes on remote
2024/10/17 13:28:55 INFO : vfs cache: cleaned: objects 0 (was 0) in use 0, to upload 0, uploading 0, total size 0 (was 0)
2024/10/17 13:29:55 DEBUG : OneDrive root '': Checking for changes on remote
2024/10/17 13:29:55 INFO : vfs cache: cleaned: objects 0 (was 0) in use 0, to upload 0, uploading 0, total size 0 (was 0)
2024/10/17 13:30:55 DEBUG : OneDrive root '': Checking for changes on remote
2024/10/17 13:30:55 INFO : vfs cache: cleaned: objects 0 (was 0) in use 0, to upload 0, uploading 0, total size 0 (was 0)
2024/10/17 13:31:55 DEBUG : OneDrive root '': Checking for changes on remote
2024/10/17 13:31:55 INFO : vfs cache: cleaned: objects 0 (was 0) in use 0, to upload 0, uploading 0, total size 0 (was 0)
2024/10/17 13:31:55 DEBUG : : changeNotify: relativePath="root", type=0
2024/10/17 13:31:55 DEBUG : : >changeNotify:
2024/10/17 13:31:55 DEBUG : : changeNotify: relativePath="Documents", type=0
2024/10/17 13:31:55 DEBUG : : >changeNotify:
2024/10/17 13:31:55 DEBUG : : changeNotify: relativePath="Documents/Investing", type=0
2024/10/17 13:31:55 DEBUG : : >changeNotify:
2024/10/17 13:31:55 DEBUG : : changeNotify: relativePath="Documents/Investing/Investments", type=0
2024/10/17 13:31:55 DEBUG : : >changeNotify:
2024/10/17 13:31:55 DEBUG : : changeNotify: relativePath="Documents/Investing/Investments/Portfolio Management", type=0
2024/10/17 13:31:55 DEBUG : : >changeNotify:
2024/10/17 13:31:55 DEBUG : : changeNotify: relativePath="Documents/Investing/Investments/Portfolio Management/Ian King.xlsx", type=1
2024/10/17 13:31:55 DEBUG : : >changeNotify:
2024/10/17 13:32:55 DEBUG : OneDrive root '': Checking for changes on remote
2024/10/17 13:32:55 INFO : vfs cache: cleaned: objects 0 (was 0) in use 0, to upload 0, uploading 0, total size 0 (was 0)
2024/10/17 13:33:55 DEBUG : OneDrive root '': Checking for changes on remote
2024/10/17 13:33:55 INFO : vfs cache: cleaned: objects 0 (was 0) in use 0, to upload 0, uploading 0, total size 0 (was 0)
2024/10/17 13:34:55 DEBUG : OneDrive root '': Checking for changes on remote
2024/10/17 13:34:55 INFO : vfs cache: cleaned: objects 0 (was 0) in use 0, to upload 0, uploading 0, total size 0 (was 0)
2024/10/17 13:35:55 DEBUG : OneDrive root '': Checking for changes on remote
2024/10/17 13:35:55 INFO : vfs cache: cleaned: objects 0 (was 0) in use 0, to upload 0, uploading 0, total size 0 (was 0)
2024/10/17 13:36:55 DEBUG : OneDrive root '': Checking for changes on remote
2024/10/17 13:36:55 INFO : vfs cache: cleaned: objects 0 (was 0) in use 0, to upload 0, uploading 0, total size 0 (was 0)
2024/10/17 13:37:55 DEBUG : OneDrive root '': Checking for changes on remote
2024/10/17 13:37:55 INFO : vfs cache: cleaned: objects 0 (was 0) in use 0, to upload 0, uploading 0, total size 0 (was 0)
2024/10/17 13:38:55 DEBUG : OneDrive root '': Checking for changes on remote
2024/10/17 13:38:55 INFO : vfs cache: cleaned: objects 0 (was 0) in use 0, to upload 0, uploading 0, total size 0 (was 0)
^C2024/10/17 13:39:18 INFO : Signal received: interrupt
2024/10/17 13:39:18 DEBUG : vfs cache: cleaner exiting
2024/10/17 13:39:18 ERROR : /home/pi/onedrive: Unmounted rclone mount
2024/10/17 13:39:18 INFO : Exiting...