by nathaniellsfreak » Wed Oct 21, 2015 1:37 pm
I got the socket working but not the service. A Sym-link of the socket is now in: /etc/systemd/system/sockets.target.wants
$this->bbcode_second_pass_code('', '
[root@alarm alarm]# systemctl status git-daemon.socket
* git-daemon.socket - Git Daemon socket
Loaded: loaded (/etc/systemd/system/git-daemon.socket; enabled; vendor preset: disabled)
Active: active (listening) since Wed 2015-10-21 13:28:37 UTC; 1min 56s ago
Listen: [::]:9418 (Stream)
Oct 21 13:28:37 alarm systemd[1]: Listening on Git Daemon socket.
')
When I try to start the service via systemd, it shows no errors.
But after asking with systemctl "status" it tells me:
$this->bbcode_second_pass_code('', '
[root@alarm sockets.target.wants]# systemctl status git-daemon.service
* git-daemon.service - Git Daemon Instance
Loaded: loaded (/etc/systemd/system/multi-user.target.wants/git-daemon.service)
Active: inactive (dead) since Wed 2015-10-21 13:33:17 UTC; 8s ago
Process: 607 ExecStart=/usr/lib/git-core/git-daemon --inetd --export-all --base-path=/srv/git (code=exited, status=1/FAILURE)
Oct 21 13:33:17 alarm systemd[1]: Starting Git Daemon Instance...
Oct 21 13:33:17 alarm systemd[1]: Started Git Daemon Instance.
')
asking journalctl -xe tell me:
$this->bbcode_second_pass_code('', '
Oct 21 13:33:17 alarm systemd[1]: Starting Git Daemon Instance...
-- Subject: Unit git-daemon.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit git-daemon.service has begun starting up.
Oct 21 13:33:17 alarm git-daemon[607]: read error: Transport endpoint is not connected
Oct 21 13:33:17 alarm systemd[1]: Started Git Daemon Instance.
-- Subject: Unit git-daemon.service has finished start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit git-daemon.service has finished starting up.
--
-- The start-up result is done.
')
The configuration of my git.service is as follows:
$this->bbcode_second_pass_code('', '
[Unit]
Description=Git Daemon Instance
After=network.target remote-fs.target nss-lookup.target
[Service]
Type=forking
User=git
Group=git
# The '-' is to ignore non-zero exit statuses
ExecStart=-/usr/lib/git-core/git-daemon --inetd --export-all --base-path=/srv/git
StandardInput=socket
StandardOutput=inherit
StandardError=journal
[Install]
WantedBy=multi-user.target
')
Thanks for your help WarheadsSE