diff options
| author | Adam Tauber <asciimoo@gmail.com> | 2020-06-18 19:34:32 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-06-18 19:34:32 +0200 |
| commit | 4a8a16559af18ab38d796aad303a827c8c640fa2 (patch) | |
| tree | 3e056ebdc13610fa4e6a4f73ac9d0d044f10ba78 /utils/templates/lib | |
| parent | 0dc5bdb6ef602d00456eb1db96d45e2f42b2b7a4 (diff) | |
| parent | 0616684baa58b86cac5df6546432d4372f965fe2 (diff) | |
Merge pull request #1803 from return42/filtron
Tooling Box to setup & maintain searx instances and services.
Diffstat (limited to 'utils/templates/lib')
| -rw-r--r-- | utils/templates/lib/systemd/system/filtron.service | 29 | ||||
| -rw-r--r-- | utils/templates/lib/systemd/system/morty.service | 29 |
2 files changed, 58 insertions, 0 deletions
diff --git a/utils/templates/lib/systemd/system/filtron.service b/utils/templates/lib/systemd/system/filtron.service new file mode 100644 index 000000000..3b0c6edcc --- /dev/null +++ b/utils/templates/lib/systemd/system/filtron.service @@ -0,0 +1,29 @@ +[Unit] + +Description=${SERVICE_NAME} +After=syslog.target +After=network.target + +[Service] + +Type=simple +User=${SERVICE_USER} +Group=${SERVICE_GROUP} +WorkingDirectory=${SERVICE_HOME} +ExecStart=${SERVICE_HOME}/go-apps/bin/filtron -api '${FILTRON_API}' -listen '${FILTRON_LISTEN}' -rules '${FILTRON_RULES}' -target '${FILTRON_TARGET}' + +Restart=always +Environment=USER=${SERVICE_USER} HOME=${SERVICE_HOME} + +# Some distributions may not support these hardening directives. If you cannot +# start the service due to an unknown option, comment out the ones not supported +# by your version of systemd. + +ProtectSystem=full +PrivateDevices=yes +PrivateTmp=yes +NoNewPrivileges=true + +[Install] + +WantedBy=multi-user.target diff --git a/utils/templates/lib/systemd/system/morty.service b/utils/templates/lib/systemd/system/morty.service new file mode 100644 index 000000000..25b676b51 --- /dev/null +++ b/utils/templates/lib/systemd/system/morty.service @@ -0,0 +1,29 @@ +[Unit] + +Description=${SERVICE_NAME} +After=syslog.target +After=network.target + +[Service] + +Type=simple +User=${SERVICE_USER} +Group=${SERVICE_GROUP} +WorkingDirectory=${SERVICE_HOME} +ExecStart=${SERVICE_HOME}/go-apps/bin/morty -key '${MORTY_KEY}' -listen '${MORTY_LISTEN}' -timeout ${MORTY_TIMEOUT} + +Restart=always +Environment=USER=${SERVICE_USER} HOME=${SERVICE_HOME} DEBUG=${SERVICE_ENV_DEBUG} + +# Some distributions may not support these hardening directives. If you cannot +# start the service due to an unknown option, comment out the ones not supported +# by your version of systemd. + +ProtectSystem=full +PrivateDevices=yes +PrivateTmp=yes +NoNewPrivileges=true + +[Install] + +WantedBy=multi-user.target |