Last active
July 14, 2017 14:23
-
-
Save snmslavk/ccb798aabe9f6b7a44717931426d4e61 to your computer and use it in GitHub Desktop.
This file contains 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 characters
using System; | |
using System.ServiceProcess; | |
namespace WindowsService1 | |
{ | |
public partial class Service1 : ServiceBase | |
{ | |
public Service1() | |
{ | |
InitializeComponent(); | |
} | |
protected override void OnStart(string[] args) | |
{ | |
System.IO.File.AppendAllText("/tmp/logservice1.txt","starting..."); | |
} | |
protected override void OnStop() | |
{ | |
System.IO.File.AppendAllText("/tmp/logservice1.txt","stopping...."); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment