superskunk

Forum Replies Created

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • in reply to: wmic_server setup #945
    superskunk
    Participant

    Bella Mario sei un grande! i used Mario’s suggestion and now the service works like a charm. Thanks a lot.

    in reply to: wmic_server setup #887
    superskunk
    Participant

    yes i can run succesfully the server with the command PYTHONPATH=/home/xxx/aiowmi/ WMIC_SERVER_DEBUG=1 python3.7 /home/xxx/aiowmi/contrib/wmic_server/wmic_server.py but i have hundreds of wmi checks and i read that starting server in this way is not recomended in production. Now i have simply created a boot script that launches the python command above, but i’d like to run the service properly.

    in reply to: wmic_server setup #881
    superskunk
    Participant

    hi all, i have problems creating service for the wmic server. i tried to use the sample and edit it to my needs, but i’m not good and it doesn’t work. here’s my service:
    [Unit]
    Description=WMIC Server

    [Service]
    Restart=always
    # we need the pythonpath to contain the aiowmi directory and the directory where the wmic_server.py is locat$

    # Update the following placeholders before using this file
    AIOWMI_INSTALL_DIR= /home/engineering/aiowmi/
    WMIC_SERVER_INSTALL_DIR= /home/engineering/aiowmi/contrib/wmic_server/
    WMIC_SERVER_CONFIG= /home/engineering/aiowmi/contrib/wmic_server/

    ExecStart= nice gunicorn -b 127.0.0.1:2313 –pythonpath AIOWMI_INSTALL_DIR,WMIC_SERVER_INSTALL_DIR –threads 1 “wmic_server:app”
    ExecStop= /usr/bin/pkill -f “wmic_server:app”

    # Optionally, use these additional settings
    # WMIC_SERVER_CONFIG_DIRECTORY defaults to WMIC_SERVER_INSTALL_DIR
    # Environment=WMIC_SERVER_CONFIG=WMIC_SERVER_CONFIG_DIRECTORY/wmic_server.yaml
    # Environment=WMIC_SERVER_DEBUG=1

    [Install]
    WantedBy=multi-user.target
    ——————————————————————————————————–

    And this is the error:
    [/usr/lib/systemd/system/wmic_server.service:13] Executable path is not absolute, ignoring: nice gunicorn -b 127.0.0.1:2313 –pythonpath AIOWMI_INSTALL_DIR,WMIC_SERVER_INSTALL_DIR –threads 1 “wmic_server:app”
    Oct 21 15:51:52 TESSCENTWEB001.xxx.IT systemd[1]: wmic_server.service has no ExecStart= setting, which is only allowed for RemainAfterExit=yes services. Refusing.

    i know that the problem is that i don’t have the necessary knowledge, can someone help me? thank you very much

Viewing 3 posts - 1 through 3 (of 3 total)