master
Evan Chen 2023-08-29 10:29:29 +08:00
parent e5e3ba7530
commit 63842d9bf1
3 changed files with 15 additions and 15 deletions

13
NetworkMonitor.service Normal file
View File

@ -0,0 +1,13 @@
[Unit]
Description=Evan Network Monitor
[Service]
WorkingDirectory=/home/evan/Documents/NetworkMonitor/runtime
ExecStart=/home/evan/Documents/NetworkMonitor/nwm
Restart=always
StandardOutput=append:/home/evan/Documents/NetworkMonitor/runtime/service.log
StandardError=append:/home/evan/Documents/NetworkMonitor/runtime/service.log
[Install]
WantedBy=multi-user.target

View File

@ -1,13 +0,0 @@
[Unit]
Description=Evan Network Monitor
[Service]
WorkingDirectory=/home/evan/Documents/network-monitor/runtime
ExecStart=/home/evan/Documents/network-monitor/nwm
Restart=always
StandardOutput=append:/home/evan/Documents/network-monitor/runtime/service.log
StandardError=append:/home/evan/Documents/network-monitor/runtime/service.log
[Install]
WantedBy=multi-user.target

View File

@ -1,7 +1,7 @@
sudo systemctl stop nwm
sudo systemctl stop NetworkMonitor
go build -o nwm main.go
sudo systemctl start nwm
sudo systemctl start NetworkMonitor