[Unit] Description=Apache web server After=network.target [Service] ExecStart=/usr/local/bin/mydaemon Type=oneshot Restart=on-failure [Install] WantedBy=multi-user.target