The goal is to use an LXC
container with Docker
to automate the build process for boondocks-os
.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# To be used as a cron job weekly (or other) placed under /etc/cron.weekly | |
# Will use mongodb's logrotate function, but then will compress and keep at most 12 weeks worth of rotate logs. | |
killall -SIGUSR1 `cat /var/run/mongodb/mongod.pid` | |
gzip /var/log/mongodb/*20[0-9][0-9]-*-[0-9][0-9] | |
logs_total=`ls -tx1 /var/log/mongodb/ | egrep "20[0-9][0-9]-.*\.gz" | wc -l` | |
if [ "$logs_total" -gt 12 ]; then | |
logs_difference=`expr $logs_total - 12` | |
logs_to_remove=`ls -tx1 /var/log/mongodb/ | egrep "20[0-9][0-9]-.*\.gz" | tail -n $logs_difference` | |
for log_file in $logs_to_remove; do |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# current Git branch | |
branch=$(git symbolic-ref HEAD | sed -e 's,.*/\(.*\),\1,') | |
# v1.0.0, v1.5.2, etc. | |
versionLabel=v$1 | |
# establish branch and tag name variables | |
devBranch=develop |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Boondocks OS Yocto Build Wrapper | |
set -e # fail fast | |
# capture the root directory of the Boondocks OS source repo. | |
repo_root=$(pwd) | |
# function onError() { | |
# onExit(); | |
# } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Build, Install SerialPortStream | |
# https://github.com/jcurl/SerialPortStream | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# This script connects the computer to a vpn server using openconnect without pain | |
prog_name=$(basename $0) | |
# CHANGE YOUR_VPN_SERVER_DOMAIN to the VPN server you know like example.com | |
domain=YOUR_VPN_SERVER_DOMAIN | |
function help { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
echo "This is a idle script (infinite loop) to keep container running." | |
echo "Please replace this script." | |
cleanup () | |
{ | |
kill -s SIGTERM $! | |
exit 0 | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Threading.Tasks; | |
using Octokit; | |
using Octokit.Internal; | |
namespace GithubApiTest | |
{ | |
class Program | |
{ | |
static async Task<int> Main(string[] args) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
test_it() { | |
SECONDS=0 | |
local connects=0 | |
while :; do | |
((connects++)) | |
if ((connects >= 10000000 && SECONDS >= 20)); then | |
echo $connects | |
echo $SECONDS | |
break; | |
fi |