Hosting on Ubuntu Linux 20.04
We suppose you did some changes in your Current .Net 6.0 Worker Service (which we install in Case Study of Install .Net 6.0 Worker Service on Ubuntu Linux 20.04) and now wants to publish those changes on Ubuntu Linux and reflect those changes on the service.
Publish files
In this step, we are going to copy that folder to Linux Virtual Machine for doing that we are going to use WinSCP. URL to Download WinSCP: – https: //winscp.net/eng/index.php
sudo systemctl status workerservice
And service is up and running.
sudo systemctl stop workerservice
And you can again check the service status to confirm.
sudo systemctl status workerservice
sudo cp -r /home/devadmin/workerservice/ /opt/
cp -r command
Option ‘r’ with the copy command can be used to copy a directory including all its content from a source directory to the destination directory. https: //www.javatpoint.com/linux-cp-r
This will pick up the new files and allow you to start the service.
sudo systemctl daemon-reload
sudo systemctl start workerservice