6 echo "$1 [-d|-dd] [-p <prefix>]"
7 echo " -dd dry totally run (local and system wide)"
8 echo " -d dry run system-related commands"
9 echo " -p prefix path for the installation (default is ./out)"
21 THREEGATES_BASE="./out"
23 while [ $# -gt 0 ]; do
27 -p) THREEGATES_BASE="$2" ; shift ;;
33 if [ $DRYRUN -eq 2 ]; then
36 if [ $DRYRUN -ge 1 ]; then
40 if ! grep -q $GROUPNAME /etc/group ; then
41 $EXCMD_SY groupadd -r $GROUPNAME
44 $EXCMD_FS mkdir -p ${THREEGATES_BASE}/usr/lib/threegates/bin
45 $EXCMD_FS cp raw/root/usr/lib/threegates/bin/crl-manager.py ${THREEGATES_BASE}/usr/lib/threegates/bin
46 $EXCMD_SY chown root.root ${THREEGATES_BASE}/usr/lib/threegates/bin/crl-manager.py
47 $EXCMD_FS chmod 744 ${THREEGATES_BASE}/usr/lib/threegates/bin/crl-manager.py
50 $EXCMD_FS mkdir -p ${THREEGATES_BASE}/var/lib/threegates
51 $EXCMD_FS chmod 755 ${THREEGATES_BASE}/var/lib/threegates
53 $EXCMD_FS mkdir -p ${THREEGATES_BASE}/var/lib/threegates/ca
54 $EXCMD_FS chmod 755 ${THREEGATES_BASE}/var/lib/threegates/ca
56 $EXCMD_FS mkdir -p ${THREEGATES_BASE}/var/lib/threegates/crl
57 $EXCMD_FS chmod 755 ${THREEGATES_BASE}/var/lib/threegates/crl
59 $EXCMD_FS mkdir -p ${THREEGATES_BASE}/var/lib/threegates/crluri
60 $EXCMD_FS chmod 755 ${THREEGATES_BASE}/var/lib/threegates/crluri
62 $EXCMD_FS mkdir -p ${THREEGATES_BASE}/var/lib/threegates/crlurinew
63 $EXCMD_FS chmod 775 ${THREEGATES_BASE}/var/lib/threegates/crlurinew
64 $EXCMD_FS chmod g+s ${THREEGATES_BASE}/var/lib/threegates/crlurinew
65 $EXCMD_SY chgrp $GROUPNAME ${THREEGATES_BASE}/var/lib/threegates/crlurinew
67 export THREEGATES_CA_BASE="${THREEGATES_BASE}/var/lib/threegates/ca"
68 $EXCMD_FS ./bin/certs_extractor.sh