Guest User

Untitled

a guest
Jun 19th, 2018
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main()
  5. {
  6. while(1)
  7. {
  8. std::string s;
  9. std::cin >> s;
  10. std::cout << "Hello world " + s + "\n";
  11. }
  12. }
  13.  
  14. sudo systemctl stop helloworld.service
  15. sudo systemctl start helloworld.service
  16. sudo systemctl status helloworld.service
  17.  
  18.  
  19. (file name=helloworld.service path to put this file in is /lib/systemd/system)
  20. [Unit]
  21. Description=HelloWorld demo service
  22. After=network.target
  23. StartLimitIntervalSec=0
  24.  
  25. [Service]
  26. Type=simple
  27. Restart=always
  28. RestartSec=1
  29. User=root
  30. ExecStart=/home/murtaza/99X/C++/HelloWorld/main
  31.  
  32. [Install]
  33. WantedBy=multi-user.target
Add Comment
Please, Sign In to add comment