Skip to content

Commit da71866

Browse files
committed
-
1 parent 6ededbd commit da71866

File tree

2 files changed

+59
-1
lines changed

2 files changed

+59
-1
lines changed

coderbot.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"move_tr_speed": "75", "move_fw_elapse": "20", "show_page_program": "true", "load_at_start": "", "move_tr_elapse": "90", "sound_start": "$startup.mp3", "sound_stop": "$shutdown.mp3", "camera_exposure_mode": "auto", "prog_move_motion": "yes", "prog_video_rec": "true", "show_control_move_commands": "true", "prog_level": "basic", "prog_scrollbars": "true", "ctrl_fw_speed": "100", "move_fw_speed": "100", "show_page_control": "true", "sound_shutter": "$shutter.mp3", "show_page_prefs": "true", "prog_maxblocks": "5", "ctrl_hud_image": "coderbot_hud_2.png", "button_func": "none", "move_motor_mode": "servo", "ctrl_fw_elapse": "-1", "ctrl_tr_elapse": "-1", "move_power_angle_2": "20", "move_power_angle_3": "20", "ctrl_tr_speed": "80", "move_power_angle_1": "20"}
1+
{"move_tr_speed": "75", "move_fw_elapse": "1.5", "show_page_program": "true", "load_at_start": "", "move_tr_elapse": "1", "sound_start": "$startup.mp3", "sound_stop": "$shutdown.mp3", "camera_exposure_mode": "auto", "prog_video_rec": "true", "show_control_move_commands": "true", "prog_level": "basic_move", "prog_scrollbars": "true", "ctrl_fw_speed": "100", "move_fw_speed": "100", "show_page_control": "true", "sound_shutter": "$shutter.mp3", "show_page_prefs": "true", "prog_maxblocks": "5", "ctrl_hud_image": "coderbot_hud_2.png", "button_func": "none", "move_motor_mode": "dc", "ctrl_fw_elapse": "-1", "ctrl_tr_elapse": "-1", "move_power_angle_2": "80", "move_power_angle_3": "80", "ctrl_tr_speed": "80", "move_power_angle_1": "40"}

scripts/wifi

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
#!/bin/sh
2+
3+
### BEGIN INIT INFO
4+
# Provides: wifi
5+
# Required-Start: $remote_fs $syslog
6+
# Required-Stop: $remote_fs $syslog
7+
# Default-Start: 2 3 4 5
8+
# Default-Stop: 0 1 6
9+
# Short-Description: WiFi service
10+
# Description: Provide WiFi
11+
### END INIT INFO
12+
13+
# Change the next 3 lines to suit where you install your script and what you want to call it
14+
DIR=/home/pi/coderbot
15+
DAEMON=$DIR/wifi.py
16+
DAEMON_NAME=wifi
17+
18+
# This next line determines what user the script runs as.
19+
# Root generally not recommended but necessary if you are using the Raspberry Pi GPIO from Python.
20+
DAEMON_USER=root
21+
22+
# The process ID of the script when it runs is stored here:
23+
PIDFILE=/var/run/$DAEMON_NAME.pid
24+
25+
. /lib/lsb/init-functions
26+
27+
do_start () {
28+
log_daemon_msg "Starting system $DAEMON_NAME daemon"
29+
start-stop-daemon --start --background --pidfile $PIDFILE --make-pidfile --user $DAEMON_USER --chdir $DIR --chuid $DAEMON_USER --startas $DAEMON
30+
log_end_msg $?
31+
}
32+
do_stop () {
33+
log_daemon_msg "Stopping system $DAEMON_NAME daemon"
34+
start-stop-daemon --stop --pidfile $PIDFILE --retry 10
35+
log_end_msg $?
36+
}
37+
38+
case "$1" in
39+
40+
start|stop)
41+
do_${1}
42+
;;
43+
44+
restart|reload|force-reload)
45+
do_stop
46+
do_start
47+
;;
48+
49+
status)
50+
status_of_proc "$DAEMON_NAME" "$DAEMON" && exit 0 || exit $?
51+
;;
52+
*)
53+
echo "Usage: /etc/init.d/$DAEMON_NAME {start|stop|restart|status}"
54+
exit 1
55+
;;
56+
57+
esac
58+
exit 0

0 commit comments

Comments
 (0)