[Unit] Description=AirPipe Service After=network.target [Service] Type=simple User=UserPlaceholder ExecStart=/usr/local/bin/airpipe server Environment="AIRPIPE_API_KEY=ApiKeyPlaceholder" Environment="AIRPIPE_CONFIG_DIR=ConfigDirPlaceholder" Environment="AIRPIPE_DATA_DIR=DataDirPlaceholder" Environment="AIRPIPE_LOG_DIR=LogDirPlaceholder" Restart=on-failure # Redirecting standard output and error to a log file StandardOutput=append:/var/log/airpipe-service.log StandardError=inherit # Ensuring clean PID management and service termination ExecStartPre=/bin/rm -f /run/airpipe.pid ExecStop=/bin/kill -TERM $MAINPID ExecStopPost=/bin/rm -f /run/airpipe.pid # Timeout for service shutdown TimeoutStopSec=30 [Install] WantedBy=multi-user.target