Skip to content

Commit

Permalink
add systemd files
Browse files Browse the repository at this point in the history
  • Loading branch information
tgulacsi committed Jul 19, 2018
1 parent 5e65bd6 commit b2d9be0
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 1 deletion.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ c
d
t
agostle
agostle.*
*.text
testdata/
*.swp
Expand Down
10 changes: 10 additions & 0 deletions etc/systemd/system/agostle.socket
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[Unit]
Description=Agostle listening socket

[Socket]
[email protected]
ListenStream=9500
NoDelay=true

[Install]
WantedBy=local.target
25 changes: 25 additions & 0 deletions etc/systemd/system/[email protected]
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
[Unit]
Description=Agostle anything-to-PDF daemon
Requires=agostle.socket
After=network.target

[Install]
WantedBy=local.target

[Service]
Restart=always
Environment=LOGDIR=/var/log/agostle-%i TMPDIR=/var/tmp/agostle-%i
User=agostle
WorkingDirectory=/home/agostle
ExecStartPre=+/bin/mkdir -p $LOGDIR $TMPDIR
ExecStartPre=+/bin/chown agostle $LOGDIR $TMPDIR
ExecStartPre=-/home/agostle/agostle update
ExecStart=/home/agostle/agostle serve

NonBlocking=true
Sockets=agostle.socket

NoNewPrivileges=true
PrivateTmp=true
#ProtectSystem=full
#ReadWritePaths=/var/log/agostle-%i /var/tmp/agostle-%i

0 comments on commit b2d9be0

Please sign in to comment.