git-auto-sync
git-auto-sync copied to clipboard
daemon: "the service is not installed"
Hi Vishesh,
I just installed git-auto-sync on my Ubuntu 22.04.1 LTS as described in the Installation section for Ubuntu/Debian. Installation worked without issue.
I added a couple of respositories I want to sync using git-auto-sync:
❯ git-auto-sync daemon add /home/me/src/ppp/repo1
Installing git-auto-sync as a daemon
Starting git-auto-sync-daemon
❯ git-auto-sync daemon add /home/me/src/ppp/repo2
Starting git-auto-sync-daemon
❯ git-auto-sync daemon add /home/me/src/ppp/repo3
Starting git-auto-sync-daemon
❯ git-auto-sync daemon add /home/me/src/ppp/repo4
Starting git-auto-sync-daemon
❯ git-auto-sync daemon ls
/home/me/src/ppp/repo1
/home/me/src/ppp/repo2
/home/me/src/ppp/repo3
/home/me/src/ppp/repo4
❯ git-auto-sync daemon status
2022/08/29 12:02:50 the service is not installed
As a result of the daemon not running, the repos are not synchronised.
Is there anything I am doing wrong or is there any prerequisite bevor installing git-auto-sync?
Regards Peer
I have this same problem on Ubuntu 22.04.
I have this problem on Ubuntu 20.04.
git-auto-sync sync works
git-auto-sync daemon add REPO works
git-auto-sync daemon status 2022/10/13 19:30:16 the service is not installed
the daemon does run for the first repo I added even though it shows not installed. Any repos I've added after the first one do not run
Same here! Also on Ubuntu 22.02.1 LTS
I have this problem on Ubuntu 20.04.
git-auto-sync sync works
git-auto-sync daemon add REPO works
git-auto-sync daemon status 2022/10/13 19:30:16 the service is not installed
the daemon does run for the first repo I added even though it shows not installed. Any repos I've added after the first one do not run
Exactly the same here! Also on Ubuntu 20.04, have you managed to found a solution? In my case haven't been able to make it work even on the first repo.
Same issue for me (using latest Pop Os)
Currently looking on a workaround for this. The issue seems to be related to the fact the daemon is installed as an user service
I didn't manage to get the daemon running to always sync the repo, but since I only ever edit it with a specific app that only does exactly that, I made a workaround.
Edit your editor's desktop entry to make it run git-auto-sync watch
in the background when you open it. Just replace Exec with the following command:
/bin/bash -c "cd <YOUR REPO>; git-auto-sync w & bg=\\$! ; <ORIGINAL EXEC> ; sleep 10; kill \\$bg ;"
I hope this helps.
Hey just to comment that I'm having the same issue on fedora 39, would be good if there was a more reliable solution than the workaround above.
As per my research under Linux Ubuntu server, below is the solution.
COMMAND PROGRAMMING PROBLEM Command : "auto-sync daemon status" <-- is existing and not working and it has been rename to auto-sync-daemon with incomplete and mixed variable function update. Which lead some old function variable still working with old command and status is working as service on/off.
RESEARCH GitHub Repo File : .goreleaser.yaml <-- Have the new name "git-auto-sync-daemon" Actual File name : git-auto-sync-daemon <-- Have the new file in location /usr/bin Process See Command - ps aux : Show the "git-auto-sync-daemon" & "git-auto-sync-daemon status" process running under user-account not main root account.
Commands Testing
"git-auto-sync daemon ls" <-- is existing and working
"git-auto-sync-daemon ls <-- is working
"git-auto-sync daemon add " <-- is existing and working
"git-auto-sync-daemon add <-- FYI: Doesn't work completely and need to remove
"auto-sync-daemon status" <-- is working and it must stay on to initial pull command every 10 min and push command instantly.
SOLUTION Follow below steps
Confirm after cloning the repo to localhost, created the test file in the localhost folder and tested the successfully sync with manual "git-auto-sync sync" command.
Add the full repo path using Command : "git-auto-sync daemon add "
Initiated the command to "auto-sync-daemon status" to run the monitor system and check if working. Confirm it work until it stay on, but soon as you stop it completely stop.
I didn't manage to get the daemon running to always sync the repo, but since I only ever edit it with a specific app that only does exactly that, I made a workaround.
Edit your editor's desktop entry to make it run
git-auto-sync watch
in the background when you open it. Just replace Exec with the following command:
/bin/bash -c "cd <YOUR REPO>; git-auto-sync w & bg=\\$! ; <ORIGINAL EXEC> ; sleep 10; kill \\$bg ;"
I hope this helps.
What should be done at this "ORIGINAL EXEC" part?