From efbbcd0be1c917da9cce7c9412726e1a38f878da Mon Sep 17 00:00:00 2001 From: creme Date: Sat, 28 Jan 2023 13:29:56 +0100 Subject: [PATCH] update systemd service files --- 0x0-prune.service | 6 +++--- 0x0.service | 17 +++++++++++++++++ 2 files changed, 20 insertions(+), 3 deletions(-) create mode 100644 0x0.service diff --git a/0x0-prune.service b/0x0-prune.service index 8dcb7cb..7a73788 100644 --- a/0x0-prune.service +++ b/0x0-prune.service @@ -4,12 +4,12 @@ After=remote-fs.target [Service] Type=oneshot -User=nullptr +User=0x0 WorkingDirectory=/srv/0x0 BindPaths=/srv/0x0 Environment=FLASK_APP=fhost -ExecStart=/usr/bin/flask prune +ExecStart=/srv/0x0/venv/bin/flask prune ProtectProc=noaccess ProtectSystem=strict ProtectHome=tmpfs @@ -19,4 +19,4 @@ ProtectKernelLogs=true LockPersonality=true [Install] -WantedBy=multi-user.target +WantedBy=multi-user.target \ No newline at end of file diff --git a/0x0.service b/0x0.service new file mode 100644 index 0000000..954a6cd --- /dev/null +++ b/0x0.service @@ -0,0 +1,17 @@ +[Unit] +Description=null-pointer.service +After=network.target + +[Service] +Type=simple +User=0x0 +Group=0x0 +WorkingDirectory=/srv/0x0/ +ExecStart=/usr/bin/uwsgi_python39 --socket 127.0.0.1:3031 --wsgi-file fhost.py --callable app --processes 4 --threads 2 --master +Restart=always +RestartSec=5 +StartLimitInterval=60s +StartLimitBurst=3 + +[Install] +WantedBy=default.target