Home > OS >  Systemctl how to console application configuration become service
Systemctl how to console application configuration become service

Time:03-16

A simple dotnet core console application, the program is running will have a console window

Use systemctl service configuration, the when using systemctl start service_name, command line has been stuck in there, can't jump out to

Here is/usr/lib/systemd/system/ConsoleApp. The service content

 
Description=ca
After=syslog. Target network. Target remote - fs. Target NSS - lookup. Target
[Service]
User=zhimin
Group=zhimin

Type=forking
ExecStart=/home/zhimin/Downloads/publish - Linux - x64/ConsoleApp1 & amp;
ExecRelead=/bin/kill HUP $MAINPID
ExecStop=/home/zhimin/Downloads/publish/stop sh
PrivateTmp=true

[Install]
WantedBy=multi - user. Target


  • Related