Automatic Agent Start under Linux To run agent automatically on the machine boot under Linux, configure daemon process with the agent.sh start command to start it and agent.sh stop command to stop it. Refer to an example procedure below: 1. Navigate to the services start/stop services scripts directory: cd /etc/init.d/ 2. Open the build agent service script: sudo vim buildAgent 3. Paste the following into the file : #!/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="agentuser" case "$1" in start) su - $USER -c "cd BuildAgent/bin ; ./agent.sh start" ;; stop) su - $USER -c "cd BuildAgent/bin ; ./agent....
the classical way to mount filelsystems automatically is to use fstab there is another method which is based on systemd [root@svn ~]# cat /etc/fstab # # /etc/fstab # Created by anaconda on Wed Apr 26 17:25:59 2017 # # Accessible filesystems, by reference, are maintained under '/dev/disk' # See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info # /dev/mapper/cl-root / xfs defaults 0 0 UUID=6e3708b2-09ea-43f3-b0f0-9b43a157b3b1 /boot xfs defaults 0 0 /dev/mapper/cl-swap swap swap defaults 0 0 [root@svn ~]# #description /boot - where you want to mount filesystem xfs - filesystem defaults ...
Comments
Post a Comment