0
[Unit]
Description=IDP project service
After=multi-user.target
Conflicts=getty@tty1.service

[Service]
Type=simple
ExecStart=/usr/bin/python3 /home/ubuntu/idp_project.py
WorkingDirectory=/home/ubuntu
User=ubuntu

[Install]
WantedBy=multi-user.target

The above is my systemd service. I want to pass input to the idp_project.py

ServerCreate sc = Builders.server().name(instance_name).flavor(flavor_id).image(img_id).build();
        sc.addNetwork("network_id",fixedip); 
        Server server = os.compute().servers().boot(sc);

The above is my VM creation code using OpenStack SDK java. Please also tell me how to access the passed parameters in systemd service file

anonymous
  • 11
  • 3

0 Answers0