Skip to content

Instantly share code, notes, and snippets.

@chexov
Forked from KonradIT/ambernation.sh
Last active August 29, 2015 14:07
Show Gist options
  • Save chexov/4ddc41c5098e4639ac88 to your computer and use it in GitHub Desktop.
Save chexov/4ddc41c5098e4639ac88 to your computer and use it in GitHub Desktop.
#!/bin/sh
# udhcpc script edited by Tim Riker <[email protected]>
[ -z "$1" ] && echo "Error: should be called from udhcpc" && exit 1
RESOLV_CONF="/etc/resolv.conf"
[ -n "$broadcast" ] && BROADCAST="broadcast $broadcast"
[ -n "$subnet" ] && NETMASK="netmask $subnet"
case "$1" in
deconfig)
/sbin/ifconfig $interface 0.0.0.0
;;
renew|bound)
/sbin/ifconfig $interface $ip $BROADCAST $NETMASK
if [ -n "$router" ] ; then
echo "deleting routers"
while route del default gw 0.0.0.0 dev $interface ; do
:
done
for i in $router ; do
route add default gw $i dev $interface
done
fi
echo -n > $RESOLV_CONF
[ -n "$domain" ] && echo search $domain >> $RESOLV_CONF
for i in $dns ; do
echo adding dns $i
echo nameserver $i >> $RESOLV_CONF
done
;;
esac
exit 0
#==============================================================================#
[global]
media_path=/tmp/fuse_d/DCIM/
#==============================================================================#
[gpStream]
# Buffer size to read preview ts files. default 400000. TCP Only
buffer_size=400000
# on = 1, off = 0
log_level=0
# TCP or UDP
ip_protocol=UDP
# TCP or UDP port (will be deprecated)
server_port=8554
# How long camera send ts files without keep alive signal from client (in secs)
keep_alive_threshold=10
# latest ts file check poll wait in micro sec. default = 5000
ts_poll_wait=1000
# Temp setting for testing
client_ip_address=192.168.1.33
# Deprecated Options
# ts header on: 1/off: 0 (next_seg_no:ts_seg_size). TCP only.
#ts_header=1
# use mmap or fread & memory
#use_mmap=0
# use minumum scan and auto increment of segment
#use_minscan=0
# How often client send keep alive signal to camera (number of ts files)
#keep_alive=10
#==============================================================================#
[gpMediaCache]
mod=0
size=1
# run memcached as
user=root
# file socket for memcached
socket=/tmp/mc.sock
# memcached memory size in MB
cache_size=2
#==============================================================================#
[gpBroadcaster]
# gpBroadcaster.conf file
# Location: /usr/local/gopro/etc/gpBroadcaster.conf
#
# How many retries if gpBroadcaster does not get oauth token from server
oauth_token_get_retries=3
# How many retires if gpBroadcaster does not get broadcast token from server
broadcast_token_get_retries=3
# How many retries if gpBroadcaster is not able to upload ts files to server
# (Not for the same file retries. It always uploads latest ts files)
# Only consecutive failure will result in exiting of gpBroadcaster.
upload_ts_retries=120
# log off: 0, log on:1, more log:2
log_level=0
# Location of OAuth token file
oauth_token_file=/pref/cloud_token
# Curl protocol
curl_protocol=http
# Curl port to bypass BP
curl_port=80
# Cloud IP address. Leave it blank not to use IP address.
cloud_ip=127.0.0.1
# Media path to ts files (Do not omit / at the end of path)
media_path=/var/www/live/
# status 1: on 0: off
status=1
# Full path to stats file
status_file=/tmp/fuse_d/broadcaster_state.csv
# Number of segments to aggregate in stats before output to a file (default = 8)
status_interval=8
#==============================================================================#
[gpUploader]
# gpUploader.conf file
# Location: /usr/local/gopro/etc/gpUploader.conf
#
# How many retries if gpBroadcaster does not get oauth token from server
oauth_token_get_retries=3
# How many retires if gpBroadcaster does not get broadcast token from server
broadcast_token_get_retries=3
# How many retries if gpBroadcaster is not able to upload ts files to server
# (Not for the same file retries. It always uploads latest ts files)
# Only consecutive failure will result in exiting of gpBroadcaster.
upload_ts_retries=120
# log off: 0, log on:1, more log:2
log_level=0
# Location of OAuth token file
oauth_token_file=/pref/cloud_token
# Curl protocol
curl_protocol=http
# Curl port to bypass BP
curl_port=80
# Cloud Upload URL
cloud_upload_url=api.sandbox.staging.gopro.com/v1/tickets
# Upload queue file location (Do not omit / at the end of path)
#upload_queue_path=/tmp/fuse_d/MISC/
upload_queue_path=/pref/
# gpUploader upload history file location (Do not omit / at the end of path)
upload_history_path=/tmp/fuse_d/MISC/
# gpUploader idle temp file
gpuploader_idle_file=/tmp/gpuploader_idle_file
#==============================================================================#
# setup_preview.sh
#
# 20121112JY - move preview setup code to script out of uI code
ifconfig usb0 up
ifconfig usb0 10.9.9.1 netmask 255.255.255.0
route add default gw 10.9.9.9
mount --bind /tmp/fuse/live /var/www/live
# mount --bind /tmp/fuse_d /var/www/videos
# mount --bind /tmp/fuse/shutter /var/www/shutter
cherokee-worker -a -C /usr/local/gopro/etc/cherokee.conf &
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment