Look at LSB init scripts for more information.
Copy to /etc/init.d:
# replace "$YOUR_SERVICE_NAME" with your service's name (whenever it's not enough obvious)| #!/bin/python3 | |
| from urllib.request import Request, urlopen | |
| from urllib.error import URLError, HTTPError | |
| import sys,time | |
| import threading | |
| from socket import timeout | |
| def geturls(ufilename): | |
| ulist = [] |
| #!/bin/python3 | |
| from urllib.request import Request, urlopen | |
| from urllib.error import URLError, HTTPError | |
| import sys | |
| def geturls(ufilename): | |
| ulist = [] | |
| with open(ufilename,'r') as ufile: |
| #!/bin/bash | |
| # lock dirs/files | |
| LOCKDIR="/tmp/statsgen-lock" | |
| PIDFILE="${LOCKDIR}/PID" | |
| # exit codes and text | |
| ENO_SUCCESS=0; ETXT[0]="ENO_SUCCESS" | |
| ENO_GENERAL=1; ETXT[1]="ENO_GENERAL" | |
| ENO_LOCKFAIL=2; ETXT[2]="ENO_LOCKFAIL" |
| #!/bin/sh -e | |
| ### BEGIN INIT INFO | |
| # Provides: dnscrypt-proxy | |
| # Required-Start: $remote_fs | |
| # Required-Stop: $remote_fs | |
| # Should-Start: $network $syslog | |
| # Should-Stop: $network $syslog | |
| # Default-Start: 2 3 4 5 | |
| # Default-Stop: 0 1 6 |
Look at LSB init scripts for more information.
Copy to /etc/init.d:
# replace "$YOUR_SERVICE_NAME" with your service's name (whenever it's not enough obvious)| #!/bin/sh | |
| # This is for the file /etc/init.d/dnscrypt | |
| ### BEGIN INIT INFO | |
| # Provides: dnscrypt | |
| # Required-Start: $all | |
| # Required-Stop: $all | |
| # Default-Start: 2 3 4 5 | |
| # Default-Stop: 0 1 6 | |
| # Short-Description: DNSCrypt for OpenDNS | |
| # Description: Launch the dnscrypt to communicate with OpenDNS |
| set nocompatible " be iMproved | |
| filetype on "Avoid errors on close | |
| filetype off " required! | |
| set rtp+=~/.vim/bundle/vundle/ | |
| call vundle#rc() | |
| " Bundles {{{- | |
| " let Vundle manage Vundle | |
| " required! |
| 1- First Expand the filesystem & Enable the SSH and Changing the default user "pi" password | |
| 2- Change the locale and timezone | |
| 3- Configure the Wifi to connect into the internet | |
| http://www.maketecheasier.com/setup-wifi-on-raspberry-pi/ | |
| sudo echo -e "\n# Disable power management\noptions 8192cu rtw_power_mgnt=0" >>/etc/modprobe.d/8192cu.conf # disable the power saving | |
| http://raspisimon.no-ip.org/ipaddress.php | |
| or | |
| https://coderwall.com/p/v290ta/raspberry-pi-wifi-setup-with-wpa2-psk-aes | |
| 4- Connect via ssh |
| #define ANALOG_IN 0 | |
| void setup() { | |
| Serial.begin(9600); | |
| //Serial.begin(115200); | |
| } | |
| void loop() { | |
| int val = analogRead(ANALOG_IN); | |
| Serial.write( 0xff ); |
| /* | |
| * Oscilloscope | |
| * Gives a visual rendering of analog pin 0 in realtime. | |
| * | |
| * This project is part of Accrochages | |
| * See http://accrochages.drone.ws | |
| * | |
| * (c) 2008 Sofian Audry (info@sofianaudry.com) | |
| * | |
| * This program is free software: you can redistribute it and/or modify |