Add systemd service file

This commit is contained in:
akp 2024-11-07 15:22:09 +00:00
parent 98862c7984
commit 82c8f29941
No known key found for this signature in database
GPG key ID: CF8D58F3DEB20755

18
piphone.system Normal file
View file

@ -0,0 +1,18 @@
[Unit]
Description=RWS Pi Phone
After=network.target
[Service]
ExecStart=/usr/local/pi-phone/pi-phone
Type=simple
Restart=always
Environment='PIPHONE_EXTERNAL_ADDRESS=https://example.com'
Environment='PIPHONE_SCHEDULED_CALLS=[{"t":1730989200,"n":"+440000000000"}]'
Environment='PIPHONE_TWILIO_ACCOUNT_AUTH_TOKEN=authtoken'
Environment='PIPHONE_TWILIO_ACCOUNT_SID=accountsid'
Environment='PIPHONE_TWILIO_FROM_NUMBER=+440000000000'
Environment='PIPHONE_HTTP_ADDRESS=0.0.0.0:4600'
[Install]
WantedBy=default.target
RequiredBy=network.target