We are using Bamboo server for continues integration with remote agents which are building our projects. These agent can be started up with a simple shell script (which works fine). But I thought I will move it even further and make it
systemd unit which will make agent autostart after boot and it will allow people to start/stop it via
systemctl commands. So this what I have tried
[Unit] Description=Atlassian Bamboo Agent After=syslog.target network.target [Service] Type=forking User=shub Group=shub ExecStart=/home/shub/bamboo-agent-home/bin/bamboo-agent.sh start ExecStop=/home/shub/bamboo-agent-home/bin/bamboo-agent.sh stop [Install] WantedBy=multi-user.target
Than I have done
systemctl daemon-reload. Problem is that agent is not started up after reboot and also it's acting weird (in a way that service is restarting itself from time to time or don't come up properly after
systemctl start). So what am I doing wrong? I thought about changing
simple however I want to agent run as a background service (and script itself runs agent on the background after execution).