-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCapybara_App.service
More file actions
19 lines (16 loc) · 841 Bytes
/
Capybara_App.service
File metadata and controls
19 lines (16 loc) · 841 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#To running program as a service, adding this unit file into systemd/system/ (RaspberryPi) - systemctl daemon-reload - service service_name start
#Type:idle - systemd will delay execution of the service binary until all jobs are dispatched
#Restart Capybara_App service always if the program is on-failure or terminated
#multi-user.target - running on runlevel-3, start after the system is boot-up
[Unit]
Description=Capybara Systemd service - Building Energy Wifi
After=multi-user.target
[Service]
Type=idle
ExecStart=/usr/bin/python3 /usr/local/lib/python3.5/dist-packages/capybara-0.1-py3.5.egg/app/main.py
#Sending error_log to email by running handle_error.py
ExecStop=/usr/bin/python3 /usr/local/lib/python3.5/dist-packages/capybara-0.1-py3.5.egg/app/handle_error.py
Restart=always
RestartSec=30
[Install]
WantedBy=multi-user.target