From 62646f9dedf4c46d9e7e67ef475051aec9f75445 Mon Sep 17 00:00:00 2001 From: Jeff Leung Date: Tue, 4 Jan 2022 14:20:42 -0800 Subject: [PATCH] Update readme again --- README.md | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 6a283f7..889da84 100644 --- a/README.md +++ b/README.md @@ -38,6 +38,7 @@ This endpoint takes a GET or POST request to add or remove Microsoft Teams webho * Migrate away from SQLite to an actual multi-user SQL database - PGSql or MySQL will work as there are supported EF Core Providers for this * Route DID's to specific destinations * An actual admin UI with authentication provided by Azure AD +* Windows Service Capability ## Building @@ -63,7 +64,30 @@ A generic Linux Intel 64-bit machine is being used for this example. 1. Ensure you have the .NET Entity Framework Core Tools installed on your development machine 2. Run the following command at the root of the source tree ``dotnet ef database update --project TwilioSMSReceiver.Data -s TwilioSMSReceiver`` 3. Use a [SQLite DB Editor](https://sqlitebrowser.org/) and insert any Microsoft Teams WebHook links to the MSTeamsWebHooks table. An example would be: +```SQL +INSERT INTO MSTeamsWebHooks (WebHookUri) VALUES ("msteamswebhookurlhere"); +``` +3. Copy the ``smsdatabase.sqlite`` database file to the root of the directory where the app will run from +4. Start the TwilioSMSReceiver app up -```insert into MSTeamsWebHooks (WebHookUri) VALUES ("msteamswebhookurlhere");``` +The app can be daemonized on Linux as a systemd unit file if you wish to, an example is here: +```INI +[Unit] +Description=SMS Receiver -3. Copy the ``smsdatabase.sqlite`` database file to the root of the directory where the app will run from \ No newline at end of file +[Service] +WorkingDirectory=/opt/SMSReceiver +ExecStart=/opt/SMSReceiver/TwilioSMSReceiver +Restart=always +RestartSec=10 +SyslogIdentifier=SMSReceiver +User=dotnet +Environment=ASPNETCORE_ENVIRONMENT=Production +Environment=DOTNET_PRINT_TELEMETRY_MESSAGE=false +Environment=ASPNETCORE_URLS="http://[::]:9999" + +[Install] +WantedBy=multi-user.target +``` + +Windows service support will come in a later release \ No newline at end of file