Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- while(1)
- {
- std::string s;
- std::cin >> s;
- std::cout << "Hello world " + s + "\n";
- }
- }
- sudo systemctl stop helloworld.service
- sudo systemctl start helloworld.service
- sudo systemctl status helloworld.service
- (file name=helloworld.service path to put this file in is /lib/systemd/system)
- [Unit]
- Description=HelloWorld demo service
- After=network.target
- StartLimitIntervalSec=0
- [Service]
- Type=simple
- Restart=always
- RestartSec=1
- User=root
- ExecStart=/home/murtaza/99X/C++/HelloWorld/main
- [Install]
- WantedBy=multi-user.target
Add Comment
Please, Sign In to add comment