-1

I run my code on a raspberry pi 4 wit Raspbian GNU/Linux 11 (bullseye) .
I want to start my uwsgi server via systemd. My .ini file:

http = :5000
processes = 4
threads = 2
wsgi-file = /home/pi/Python/uwsgi_examples/hello_flask.py
callable = app

The app is a simple flask application. My my_service.service file:

[Unit]
Description=uwsgi Service
After=network.target
After=network-online.target

[Service]
ExecStart=/home/pi/.local/bin/uwsgi --ini /home/pi/Python/uwsgi_examples/flask.ini
Restart=always
KillSignal=SIGQUIT

[Install]
WantedBy=multi.user.target

When I run:

sudo systenctl start my_service.service

all works fine but after a reboot the sever is not running. (I enabled my service) When I run:

sudo systemctl status my_service

I get the following feedback:

my_service.service - uwsgi Service
     Loaded: loaded (/etc/systemd/system/my_service.service; enabled; vendor pr>
     Active: inactive (dead)

Any suggestions?

Peter S
  • 17
  • 5
  • I’m voting to close this question because From the tag: systemd questions should be for *programming questions* using systemd or its libraries. Questions about *configuring the daemon* (including writing unit files) are better directed to Unix & Linux: https://unix.stackexchange.com. – Rob Sep 06 '22 at 08:49

1 Answers1

0

I finally found my mistake. I had a typo in the .sevice file. After correcting

[Install]
WantedBy=multi.user.target

to

[Install]
WantedBy=multi-user.target

the server starts at reboot

Peter S
  • 17
  • 5