-
Notifications
You must be signed in to change notification settings - Fork 0
/
cfgwatch.service
26 lines (23 loc) · 1012 Bytes
/
cfgwatch.service
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
[Unit]
Description=Starts the configuration watch service on the device
After=network-online.target
Requires=network-online.target
[Service]
Type=simple
# global environment defined at /etc/environment - need not define here
Environment="PATH_APPCONFIG=/etc/aquapone.config.json"
Environment="PATH_APPREG=/etc/aquapone.reg.json"
Environment="UPSTREAM_URL=http://aqua.eensymachines.in:30001/api/devices"
Environment="NAME_SYSCTLSERVICE=aquapone.service"
Environment="MODE_SYSCTLCMD=0"
Environment="MODE_DEBUGLVL=5"
Environment="AMQP_SERVER=aqua.eensymachines.in:30567"
Environment="AMQP_LOGIN=eensyiot-admin:33n5y4dm1n"
Environment="AMQP_QUE=config_alerts"
Environment="AMQP_XCHG=configs_direct"
# https://askubuntu.com/questions/1363944/systemd-only-run-service-after-internet-is-up
# Since we want th service to be up only when the internet is up and running
ExecStartPre= /bin/sh -c 'until ping -c1 google.com; do sleep 1; done;'
ExecStart=/usr/bin/cfgwatch
[Install]
WantedBy=multi-user.target