From b9d30434073897b932f2be986f2b7318c8873eed Mon Sep 17 00:00:00 2001 From: Kelvin Ly Date: Thu, 27 Sep 2018 21:55:49 -0400 Subject: [PATCH] Test out running at startup --- install.sh | 1 + kelvinly-server.service | 13 +++++++++++++ 2 files changed, 14 insertions(+) create mode 100644 kelvinly-server.service diff --git a/install.sh b/install.sh index b5ae0ec..ef66e19 100755 --- a/install.sh +++ b/install.sh @@ -11,6 +11,7 @@ echo "export PATH=$PATH:/usr/lib/go-1.10/bin" >> ~/.bashrc echo "export GOPATH=~/go" >> ~/.bashrc sudo cp rules.v4 /etc/iptables/rules.v4 +sudo cp kelvinly-server.service /etc/systemd/system source ~/.bashrc go get -u gopkg.in/russross/blackfriday.v2 diff --git a/kelvinly-server.service b/kelvinly-server.service new file mode 100644 index 0000000..908e034 --- /dev/null +++ b/kelvinly-server.service @@ -0,0 +1,13 @@ +[Unit] +Description=My main HTTP server +After=network.target syslog.target + +[Service] +Type=oneshot +ExecStart=/home/kelvin/kelvinly-server/kelvinly-server +StandardOutput=syslog +StandardError=syslog + +[Install] +WantedBy=multi-user.target +