• 1 Post
  • 10 Comments
Joined 2 years ago
cake
Cake day: June 10th, 2023

help-circle


  • I really appreciate your help with this. With your changes we have even acheived some partial success!

    I did verify the package location with which google-drive-ocamlfuse, and replaced the ~ with %h.

    The current configuration for ocamlfuseStartup.sh is:

    #!/usr/bin/env bash
    /usr/bin/google-drive-ocamlfuse /home/tyler/googledrive
    

    startup.service is now:

    spoiler
    [Unit]
    Description=Startup Script
    
    [Service]
    Type=simple
    Restart=always
    RestartSec=60
    ExecStart=/bin/bash %h/.local/bin/ocamlfuseStartup.sh
    
    
    [Install]
    WantedBy=default.target
    

    This current configuration leads to 0=SUCCESS, and boy howdy was I ELATED! Until… I realized that it didn’t actually do the thing… The directory %h/googledrive remains empty unless I manually run the command “google-drive-ocamlfuse ~/googledrive” as before.

    Interestingly enough, status shows all good in the hood as far as I can tell:

    spoiler
    ~> systemctl --user status startup.service --now
     startup.service - Startup Script
         Loaded: loaded (/home/tyler/.config/systemd/user/startup.service; enabled; preset: disabled)
         Active: activating (auto-restart) since Sat 2025-03-29 15:37:04 CDT; 58s ago
     Invocation: 96b64438a1be4e36a12018e86418d8c6
        Process: 3822 ExecStart=/bin/bash /home/tyler/.local/bin/ocamlfuseStartup.sh (code=exited, status=0/SUCCESS)
       Main PID: 3822 (code=exited, status=0/SUCCESS)
            CPU: 49ms
    

    journalctl also shows no whammies as far as I can tell:

    spoiler
    ~> journalctl --user -xeu google-drive-ocamlfuse.service
    Mar 29 15:33:54 DESKTOP-MDJUBMM.attlocal.net systemd[1716]: Started FUSE filesystem over Google Drive.
    ░░ Subject: A start job for unit UNIT has finished successfully
    ░░ Defined-By: systemd
    ░░ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
    ░░ 
    ░░ A start job for unit UNIT has finished successfully.
    ░░ 
    ░░ The job identifier is 704.
    Mar 29 15:38:56 DESKTOP-MDJUBMM.attlocal.net systemd[1716]: google-drive-ocamlfuse.service: Scheduled restart job, restart counter is at 2.
    ░░ Subject: Automatic restarting of a unit has been scheduled
    ░░ Defined-By: systemd
    ░░ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
    ░░ 
    ░░ Automatic restarting of the unit UNIT has been scheduled, as the result for
    ░░ the configured Restart= setting for the unit.
    Mar 29 15:38:56 DESKTOP-MDJUBMM.attlocal.net systemd[1716]: Started FUSE filesystem over Google Drive.
    ░░ Subject: A start job for unit UNIT has finished successfully
    ░░ Defined-By: systemd
    ░░ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
    ░░ 
    ░░ A start job for unit UNIT has finished successfully.
    ░░ 
    ░░ The job identifier is 806.
    lines 16-38/38 (END)
    

    So I am once again stumped. I feel like it’s so close.

    However, with resources from others in this thread I have begun a war on two fronts. Introducing our newest contender ~/.config/systemd/user/google-drive-ocamlfuse.service Which as far as I can tell is another way of skinning this cat that doesn’t involve a seperate .sh file to be called. Seems cleaner than the angle I had started working from, but what do I know. Special thanks to Oscar with his github link to documentation and after some iterative monkeying google-drive-ocamlfuse.service looks like so:

    spoiler
    [Unit]
    Description=FUSE filesystem over Google Drive
    After=network.target
    
    [Service]
    ExecStart=google-drive-ocamlfuse /home/tyler/googledrive
    Restart=always
    RestartSec=300
    Type=simple
    
    [Install]
    WantedBy=default.target
    

    And again 0=SUCCESS and premature elation, but alas no joy. Remarkably similar status and journalctl entries, so I remain stumped. Or possibly double stumped…

    spoiler
    ~> systemctl --user status google-drive-ocamlfuse.service --now
     google-drive-ocamlfuse.service - FUSE filesystem over Google Drive
         Loaded: loaded (/home/tyler/.config/systemd/user/google-drive-ocamlfuse.service; enabled; preset: disabled)
         Active: activating (auto-restart) since Sat 2025-03-29 15:49:00 CDT; 1min 5s ago
     Invocation: 813f1d3ce9fd4c21b409074a9fca7776
        Process: 4271 ExecStart=google-drive-ocamlfuse /home/tyler/googledrive (code=exited, status=0/SUCCESS)
       Main PID: 4271 (code=exited, status=0/SUCCESS)
            CPU: 42ms
    
    ~> journalctl --user -xeu google-drive-ocamlfuse.service
    Mar 29 15:43:57 DESKTOP-MDJUBMM.attlocal.net systemd[1716]: Started FUSE filesystem over Google Drive.
    ░░ Subject: A start job for unit UNIT has finished successfully
    ░░ Defined-By: systemd
    ░░ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
    ░░ 
    ░░ A start job for unit UNIT has finished successfully.
    ░░ 
    ░░ The job identifier is 908.
    Mar 29 15:48:58 DESKTOP-MDJUBMM.attlocal.net systemd[1716]: google-drive-ocamlfuse.service: Scheduled restart job, restart counter is at>
    ░░ Subject: Automatic restarting of a unit has been scheduled
    ░░ Defined-By: systemd
    ░░ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
    ░░ 
    ░░ Automatic restarting of the unit UNIT has been scheduled, as the result for
    ░░ the configured Restart= setting for the unit.
    Mar 29 15:48:58 DESKTOP-MDJUBMM.attlocal.net systemd[1716]: Started FUSE filesystem over Google Drive.
    ░░ Subject: A start job for unit UNIT has finished successfully
    ░░ Defined-By: systemd
    ░░ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
    ░░ 
    ░░ A start job for unit UNIT has finished successfully.
    ░░ 
    ░░ The job identifier is 1031.
    lines 46-68/68 (END)
    

    I have attempted to run these competing services seperately as well as in tandem with the same lack of results. I feel that if I can’t get it licked soon I will kick systemd to the curb and attempt another method outlined in the github link provided by Oscar. Most likely the fstab method that he mentioned because it sounds violent and that’s the vibe at the moment lol. Once again thank you for any and all assistance.


  • I like to have a decently firm grasp of the commands I type into the terminal so either I’m too high or what you’re throwing down is more advanced than I’m comfortable with. Thank you for your help though. Especially regarding the broken environment, I think I am dealing with some of that now as I am now receiving an error 127. I added the full path for the google-drive-ocamlfuse package but am still receiving the error 127 so I will try to load it’s dependencies next time similar to your which sed example.




  • Thanks a ton for your help! I’m not quite there but I feel like I’m learning more lol

    With your help I have made the changes you listed as well as some other changes while trying to troubleshoot. In no particular order:

    Moved ocamlfuseStartup.sh to ~/.local/bin/ocamlfuseStartup.sh because I now am more familiar with what an immutable distro is and does and also added the shebang. File now reads:

    #!/usr/bin/env bash
    /usr/bin/google-drive-ocamlfuse ~/googledrive
    

    Moved startup.service to ~/home/tyler/.config/systemd/user/startup.service, file now reads as follows:

    [Unit]
    Description=Startup Script
    
    [Service]
    Type=simple
    Restart=always
    RestartSec=60
    ExecStart=/bin/bash ~/.local/bin/ocamlfuseStartup.sh
    
    
    [Install]
    WantedBy=default.target
    

    I am now getting (code=exited, status=127) when I run “systemctl --user status startup.service --now.” Which I have googled and determined that it is now having difficulty finding the program or one of the dependencies according to the bash man page. I attempted to troubleshoot this error by adding the full location of the program /usr/bin/google-drive-ocamlfuse to the ocamlfuseStartup.sh file. I’m unsure how to proceed from here though. Once again, super appreciative of your help. I’m going to bed now though…



  • Oh I see. I’m still pretty new to linux so I didn’t realize that tumbleweed was immutable and I guess it also didn’t really dawn on me that I was monkeying around in protected directories as I followed along with various resources trying to understand the commands and things. I now see how that could cause some issues.

    So I guess a better question would be, what is the best way to go about getting an immutable distro to run that command for me at boot? cron job? Thanks for your guidance.