WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

daemon not running from ubuntu installer #23

@pemgithub

Description

@pemgithub

README.md says

sudo echo "deb [trusted=yes] https://apt.fury.io/vhanda/ /" | sudo tee /etc/apt/sources.list.d/git-auto-sync.list
sudo apt-get update
sudo apt-get install -y git-auto-sync

Terminal was saying:

$ git-auto-sync daemon status
2025/05/15 15:29:17 the service is not installed
$ sudo systemctl daemon-reload
$ sudo systemctl enable git-auto-sync-daemon.service
Failed to enable unit: Unit file git-auto-sync-daemon.service does not exist.
$ sudo systemctl start git-auto-sync-daemon.service
Failed to start git-auto-sync-daemon.service: Unit git-auto-sync-daemon.service not found.
$ sudo systemctl status git-auto-sync-daemon.service
Unit git-auto-sync-daemon.service could not be found.

I did the following workaround:

$ sudo bash -c 'cat > /etc/systemd/system/git-auto-sync-daemon.service << EOF
[Unit]
Description=Git Auto Sync Daemon
After=network.target

[Service]
Type=simple
ExecStart=/usr/bin/git-auto-sync-daemon
Restart=on-failure
RestartSec=5
User=[user]
Group=[user]
Environment="HOME=/home/[user]"

[Install]
WantedBy=multi-user.target
EOF'
$ sudo systemctl daemon-reload
$ sudo systemctl enable git-auto-sync-daemon.service
$ sudo systemctl start git-auto-sync-daemon.service
Created symlink /etc/systemd/system/multi-user.target.wants/git-auto-sync-daemon.service → /etc/systemd/system/git-auto-sync-daemon.service.
$ sudo systemctl status git-auto-sync-daemon.service
● git-auto-sync-daemon.service - Git Auto Sync Daemon
     Loaded: loaded (/etc/systemd/system/git-auto-sync-daemon.service; enabled; vendor preset: enabled)
     Active: active (running) since Thu 2025-05-15 15:35:17 PDT; 5s ago
   Main PID: 47072 (git-auto-sync-d)
      Tasks: 9 (limit: 38033)
     Memory: 2.4M
        CPU: 397ms
     CGroup: /system.slice/git-auto-sync-daemon.service
             └─47072 /usr/bin/git-auto-sync-daemon

May 15 15:35:17 [machine name] systemd[1]: Started Git Auto Sync Daemon.
May 15 15:35:17 [machine name] git-auto-sync-daemon[47072]: Monitoring [path to my git clone]
$ sudo apt-get install -y git-auto-sync^C
$ git-auto-sync-daemon status
Monitoring [path to my git clone]

[machine name] [path to my git clone] [user] depend on host

Above fixed the problem for me.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions