From 58edb2b02b9605b053fa2d2ab7de17f2b8eb30b4 Mon Sep 17 00:00:00 2001 From: Adam Mathes Date: Mon, 20 Feb 2017 12:03:03 -0800 Subject: fix cmd line for newfeed --- etc/neko.service | 12 ++++++++++++ main.go | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 etc/neko.service diff --git a/etc/neko.service b/etc/neko.service new file mode 100644 index 0000000..4acb640 --- /dev/null +++ b/etc/neko.service @@ -0,0 +1,12 @@ +# neko rss reader + +[Unit] +Description=neko +After=mysql.service + +[Service] +User=nobody +ExecStart=neko -serve -c /etc/neko.config + +[Install] +WantedBy=multi-user.target \ No newline at end of file diff --git a/main.go b/main.go index fdf4e4b..26dd1fc 100644 --- a/main.go +++ b/main.go @@ -21,7 +21,7 @@ func main() { flag.StringVar(&newFeed, "add", "", "add feed `http://example.com/rss.xml`") flag.Parse() - if !update && !serve { + if !update && !serve && newFeed == ""{ flag.Usage() return } -- cgit v1.2.3