diff --git a/alpine/teamcityagent b/alpine/teamcityagent new file mode 100644 index 0000000..31fd4ea --- /dev/null +++ b/alpine/teamcityagent @@ -0,0 +1,28 @@ +#!/bin/sh +### BEGIN INIT INFO +# Provides: TeamCity Build Agent +# Required-Start: $remote_fs $syslog +# Required-Stop: $remote_fs $syslog +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: Start build agent daemon at boot time +# Description: Enable service provided by daemon. +### END INIT INFO +#Provide the correct user name: +USER="root" + +case "$1" in +start) + su - $USER -c "cd /opt/agent/bin ; ./agent.sh start" +;; +stop) + su - $USER -c "cd /opt/agent/bin ; ./agent.sh stop" +;; +*) + echo "usage start/stop" + exit 1 + ;; + +esac + +exit 0 \ No newline at end of file