範例: [Unit] Description=Docker Compose Application Service Requires=docker.service After=docker.service [Service] Type=sample Restart=always RestartSec=3 StartLimitIntervalSec=1200 StartLimitBurst=10 TimeoutStartSec=1200 WorkingDirectory=/home/twibm/git/iot_gw_web/docker ExecStart=/usr/local/bin/docker-compose -f iot_gw_all.yaml up ExecStop=/usr/local/bin/docker-compose -f iot_gw_all.yaml down [Install] WantedBy=multi-user.target
範例: [program:updatemeter] command=/usr/bin/python3 run_proj.py user=root directory=/home/twibm/git/iot_mbus/iot_modbus autostart=true autorestart=true stopwaitsecs=20
會自動將 con.d 底下所有 *.conf files 皆檢查並自動載入執行
主機設定
or
By clicking below, you agree to our terms of service.
New to HackMD? Sign up