chewbranca.com

Check-in [4535aac932]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Provide base fossil repo as cli arg
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 4535aac932ad45fcad3fa90732a906bf9da5d70443504cd605e574d45aae847e
User & Date: chewbranca 2020-04-08 04:46:18
Context
2020-04-08
04:47
Add load_on_server script check-in: 17ddd945a1 user: chewbranca tags: trunk
04:46
Provide base fossil repo as cli arg check-in: 4535aac932 user: chewbranca tags: trunk
02:54
Ensure apt update after adding openresty repo check-in: 9da855f5d2 user: chewbranca tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to bootstrap/Vagrantfile.

9
10
11
12
13
14
15
16
17
  config.vm.network "forwarded_port", guest: 80, host: 9080

  # Use NFS as a shared folder
  # config.vm.synced_folder ".", "/vagrant", :nfs => true, id: "vagrant-root"
  config.vm.synced_folder "../", "/vagrant", type: "rsync"

  config.vm.provision "file", source: "~/FOSSILS/chewbranca_com.fossil", destination: "$HOME/museum/chewbranca_com.fossil"
  config.vm.provision :shell, inline: "/vagrant/bootstrap/chewbranca_com.sh"
end







|

9
10
11
12
13
14
15
16
17
  config.vm.network "forwarded_port", guest: 80, host: 9080

  # Use NFS as a shared folder
  # config.vm.synced_folder ".", "/vagrant", :nfs => true, id: "vagrant-root"
  config.vm.synced_folder "../", "/vagrant", type: "rsync"

  config.vm.provision "file", source: "~/FOSSILS/chewbranca_com.fossil", destination: "$HOME/museum/chewbranca_com.fossil"
  config.vm.provision :shell, inline: "/vagrant/bootstrap/chewbranca_com.sh /home/vagrant/museum/chewbranca_com.fossil"
end

Changes to bootstrap/chewbranca_com.sh.

1
2







3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
..
28
29
30
31
32
33
34

35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#!/usr/bin/env bash








# Remove undesirable side effects of CDPATH variable
unset CDPATH
# Change current working directory to the directory contains this script
cd "$( dirname "${BASH_SOURCE[0]}" )"

# Initialize Bash Booster
source ../vendor/bashbooster-0.6/bashbooster.sh

#CHEWBRANCA_COM_FOSSIL=../../chewbranca_com.fossil
#CHEWBRANCA_COM_FOSSIL=$HOME/museum/chewbranca_com.fossil
# TODO:FIXME
CHEWBRANCA_COM_FOSSIL_SRC=/home/vagrant/museum/chewbranca_com.fossil
bb-log-info "Bootstrapping chewbranca.com"

mkdir -p /opt/bin
mkdir -p /opt/log
mkdir -p /opt/etc
mkdir -p /opt/service
mkdir -p /opt/museum
................................................................................
    mkdir -p $CSDIR
    if [[ -e $CSAK ]]; then
        if ! grep -q chewbranca $CSAK; then
            cat files/authorized_keys >> $CSAK
        fi
    else
        cp files/authorized_keys $CSAK

    fi
    chmod 0600 $CSAK
fi

if ! id -u fossil > /dev/null 2>&1; then
    adduser fossil --system
    chown fossil:fossil /opt/museum
fi

CHEWBRANCA_COM_FOSSIL=/opt/museum/chewbranca_com.fossil
if [[ ! -e "$CHEWBRANCA_COM_FOSSIL" ]]; then
    cp $CHEWBRANCA_COM_FOSSIL_SRC $CHEWBRANCA_COM_FOSSIL
    chown fossil:fossil $CHEWBRANCA_COM_FOSSIL

    touch /opt/log/chewbranca.com-fossil-error.log
    chown fossil:fossil /opt/log/chewbranca.com-fossil-error.log
fi

bb-log-info "Installing deps"


>
>
>
>
>
>
>








<
<
<
<







 







>











|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17




18
19
20
21
22
23
24
..
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#!/usr/bin/env bash

if [[ -z "$1" ]]; then
    echo "USAGE: $0 PATH_TO_CHEWBRANCA_COM.FOSSIL"
    exit 1
fi
CHEWBRANCA_SRC_REPO=$1
echo "Bootstrapping chewbranca.com from $1"

# Remove undesirable side effects of CDPATH variable
unset CDPATH
# Change current working directory to the directory contains this script
cd "$( dirname "${BASH_SOURCE[0]}" )"

# Initialize Bash Booster
source ../vendor/bashbooster-0.6/bashbooster.sh





bb-log-info "Bootstrapping chewbranca.com"

mkdir -p /opt/bin
mkdir -p /opt/log
mkdir -p /opt/etc
mkdir -p /opt/service
mkdir -p /opt/museum
................................................................................
    mkdir -p $CSDIR
    if [[ -e $CSAK ]]; then
        if ! grep -q chewbranca $CSAK; then
            cat files/authorized_keys >> $CSAK
        fi
    else
        cp files/authorized_keys $CSAK
        chown chewbranca:chewbranca $CSAK
    fi
    chmod 0600 $CSAK
fi

if ! id -u fossil > /dev/null 2>&1; then
    adduser fossil --system
    chown fossil:fossil /opt/museum
fi

CHEWBRANCA_COM_FOSSIL=/opt/museum/chewbranca_com.fossil
if [[ ! -e "$CHEWBRANCA_COM_FOSSIL" ]]; then
    cp $CHEWBRANCA_SRC_REPO $CHEWBRANCA_COM_FOSSIL
    chown fossil:fossil $CHEWBRANCA_COM_FOSSIL

    touch /opt/log/chewbranca.com-fossil-error.log
    chown fossil:fossil /opt/log/chewbranca.com-fossil-error.log
fi

bb-log-info "Installing deps"