Created
September 9, 2024 13:46
-
-
Save Sllayan/0527e8dc73815def8b8a6b1884b400f5 to your computer and use it in GitHub Desktop.
Revisions
-
Sllayan revised this gist
Sep 9, 2024 . 1 changed file with 12 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,12 @@ [Unit] Description=orderlogsback After=network.target [Service] User=root Group=www-data WorkingDirectory=/var/www/orderlogsback ExecStart=/var/www/orderlogsback/.orderlogsback/bin/python3.10 /var/www/orderlogsback/server.py [Install] WantedBy=multi-user.target -
Sllayan created this gist
Sep 9, 2024 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,27 @@ # Linux ## Run as a linux service in linux system ### How we can make a service in linux system You have to make a file in `/etc/systemd/system/` with `.service` format. format of content into this : ```python [Unit] Description={{description of your service}} After=network.target [Service] User=root Group=www-data WorkingDirectory={{directory of your service}} ExecStart={{the needed command to start }} [Install] WantedBy=multi-user.target ``` You can also configure many things according to your needs.