Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

daemon: "the service is not installed" #12

Open
peersch opened this issue Aug 29, 2022 · 10 comments
Open

daemon: "the service is not installed" #12

peersch opened this issue Aug 29, 2022 · 10 comments

Comments

@peersch
Copy link

peersch commented Aug 29, 2022

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

@auwsom
Copy link

auwsom commented Sep 12, 2022

I have this same problem on Ubuntu 22.04.

@greatplr
Copy link

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

@carlossgv
Copy link

carlossgv commented Mar 18, 2023

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.

@wighawag
Copy link

Same issue for me (using latest Pop Os)

@jhenriquelc
Copy link

Currently looking on a workaround for this.
The issue seems to be related to the fact the daemon is installed as an user service

@jhenriquelc
Copy link

jhenriquelc commented Jun 27, 2023

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.

@thomasstani
Copy link

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.

@hpngithub
Copy link

hpngithub commented Jun 2, 2024

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.

@hpngithub
Copy link

hpngithub commented Jun 9, 2024

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?

@dradtke
Copy link

dradtke commented Jan 15, 2025

I think this is an issue with the version of the service dependency that is being used. I opened #21 to upgrade it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants