Advertisement
Guest User

Untitled

a guest
Jul 23rd, 2019
149
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. # roscore upstart script
  2.  
  3. description "roscore service"
  4. author "Gozbenko Alex <gozbenko@gmail.com>"
  5.  
  6. env ROS_LOG_DIR=/var/log/ros
  7.  
  8. # When to start the service
  9. start on filesystem on runlevel [2345]
  10.  
  11. # When to stop the service
  12. stop on runlevel [016]
  13.  
  14. # Automatically restart process if crashed
  15. respawn
  16.  
  17. pre-start script
  18. mkdir -p /var/log/ros/
  19. chown ros:ros /var/log/ros/
  20.  
  21. touch /var/run/roscore.pid
  22. chmod 644 /var/run/roscore.pid
  23. chown ros:ros /var/run/roscore.pid
  24. end script
  25.  
  26. # Specify the process/command to start
  27. script
  28. exec su ros -c "source /opt/ros/electric/setup.sh && roscore --pid=/var/run/roscore.pid"
  29. end script
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement