From 98bdd5fbd06e1b0991bf4dc00c8c4319b1fd52fe Mon Sep 17 00:00:00 2001 From: Auke Kok Date: Mon, 5 Feb 2018 12:47:55 -0800 Subject: [PATCH] Switch to httpd as user, add tmpfiles template file. --- Makefile | 2 +- mtmediasrv.conf | 2 ++ mtmediasrv.service | 4 +--- 3 files changed, 4 insertions(+), 4 deletions(-) create mode 100644 mtmediasrv.conf diff --git a/Makefile b/Makefile index f208dad..7846728 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,7 @@ PREFIX ?= /usr/local DIST := COPYING Makefile mtmediasrv.service mtmediasrv.yaml nginx-server.conf readme.md PROJECT := mtmediasrv -VERSION = 2 +VERSION = 3 BUILD = `git describe --tags --always` $(PROJECT): main.go diff --git a/mtmediasrv.conf b/mtmediasrv.conf new file mode 100644 index 0000000..30fc7c3 --- /dev/null +++ b/mtmediasrv.conf @@ -0,0 +1,2 @@ +# create folder for socket location for mtmediasrv +d /run/mtmediasrv 0755 httpd httpd - diff --git a/mtmediasrv.service b/mtmediasrv.service index dfff21c..3bdb221 100644 --- a/mtmediasrv.service +++ b/mtmediasrv.service @@ -2,11 +2,9 @@ Description=Minetest Media server [Service] -User=www +User=httpd Type=simple Restart=always -ExecStartPre=+/usr/bin/mkdir -p /run/mtmediasrv -ExecStartPre=+/usr/bin/chown www /run/mtmediasrv WorkingDirectory=/var/empty ExecStart=/usr/local/bin/mtmediasrv