about summary refs log tree commit diff stats
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rwxr-xr-xtools/scripts/mirror-system73
-rw-r--r--tools/scripts/pkgmk-test.conf19
-rw-r--r--tools/scripts/pkgmk-test.sh5
-rwxr-xr-xtools/scripts/replace.sh9
-rw-r--r--tools/scripts/runvm/c12-dvd15
-rw-r--r--tools/scripts/runvm/profile/crux7
-rw-r--r--tools/scripts/runvm/runvm.sh26
-rw-r--r--tools/scripts/setup-gitolite.sh43
-rw-r--r--tools/scripts/setup-nginx.sh24
-rw-r--r--tools/scripts/setup-openssh.sh43
-rw-r--r--tools/scripts/setup-php.sh7
-rw-r--r--tools/scripts/setup-postgresql.sh87
-rw-r--r--tools/scripts/setup-x.sh96
13 files changed, 0 insertions, 454 deletions
diff --git a/tools/scripts/mirror-system b/tools/scripts/mirror-system
deleted file mode 100755
index 6c8a528..0000000
--- a/tools/scripts/mirror-system
+++ /dev/null
@@ -1,73 +0,0 @@
-#!/bin/bash
-
-if [ -f /tmp/mirror ]; then
-	echo "mirror system is already running"
-	exit 0
-fi
-
-touch /tmp/mirror
-
-#BUILD_NAME="R2D9"
-#BUILD_TITLE="${BUILD_NAME}-$(cat /usr/ports/releases/stable/metadata/build-version)"
-BUILD_TITLE="Crux 3.6"
-
-# Update system
-ports -u
-
-# make them look like updated
-echo "touch packages..."
-for package in /usr/ports/packages/*; do
-	touch ${package};
-done
-
-# make sure permissions are right
-echo "chown pkgmk:pkgmk -R /usr/ports"
-chown pkgmk:pkgmk -R /usr/ports
-
-echo "update system"
-prt-get depinst $(prt-get listinst | xargs prt-get quickdep)
-prt-get sysup
-prt-get update -fr $(revdep)
-
-# Create list of installed packages
-echo "creating list of installed..."
-rm -r /usr/ports/installed
-pkg_installed
-
-### clean distribution files
-mkdir -p /usr/ports/archive/distfiles
-mv /usr/ports/distfiles/* /usr/ports/archive/distfiles
-### clean packages files
-mkdir -p /usr/ports/archive/packages
-mv /usr/ports/packages/* /usr/ports/archive/packages
-### get sources and packages
-cd /usr/ports/installed
-for installed in *; do
-        prt-get path $installed | while read -r line; do
-		cd $line
-		##get source
-	        sudo -u pkgmk -g pkgmk pkgmk -do
-		#make sure package exists
-		current="${installed}#$(prt-get current ${installed}).pkg.tar.gz"
-		echo "checking $current ..."
-		cp /usr/ports/archive/packages/${current} /usr/ports/packages/
-		#prt-get update $installed
-        done
-done
-
-# Create repository
-echo "creating repository"
-cd /usr/ports/packages
-pkg-repgen
-
-# Create mirror page
-echo "creating mirror index page"
-portspage --title=${BUILD_TITLE} /usr/ports/installed > /usr/ports/installed/index.html
-
-sed -i "s@usr\/ports\/installed@mirror/installed@g" /usr/ports/installed/index.html
-
-echo "setting permissions /usr/ports"
-chown pkgmk:pkgmk -R /usr/ports
-
-# Remove temporary file
-rm /tmp/mirror
diff --git a/tools/scripts/pkgmk-test.conf b/tools/scripts/pkgmk-test.conf
deleted file mode 100644
index 4a04eec..0000000
--- a/tools/scripts/pkgmk-test.conf
+++ /dev/null
@@ -1,19 +0,0 @@
-#
-# /etc/pkgmk.conf: pkgmk(8) configuration
-#
-
-source /etc/pkgmk.conf
-
-#PKGMK_SOURCE_MIRRORS=(http://c1.ank/distfiles/)
-PKGMK_SOURCE_DIR="$PWD"
-PKGMK_PACKAGE_DIR="$PWD"
-PKGMK_WORK_DIR="$PWD/work"
-PKGMK_DOWNLOAD="yes"
-PKGMK_UP_TO_DATE="no"
-# PKGMK_IGNORE_FOOTPRINT="no"
-# PKGMK_IGNORE_NEW="no"
-# PKGMK_NO_STRIP="no"
-# PKGMK_DOWNLOAD_PROG="wget"
-# PKGMK_WGET_OPTS=""
-# PKGMK_CURL_OPTS=""
-# PKGMK_COMPRESSION_MODE="gz"
diff --git a/tools/scripts/pkgmk-test.sh b/tools/scripts/pkgmk-test.sh
deleted file mode 100644
index 4cfe2c3..0000000
--- a/tools/scripts/pkgmk-test.sh
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/bin/bash
-DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
-CONF=${DIR}/pkgmk-test.conf
-echo "pkgmk -cf $CONF -d -is $1"
-fakeroot pkgmk -cf $CONF -d -is $1
diff --git a/tools/scripts/replace.sh b/tools/scripts/replace.sh
deleted file mode 100755
index 8d5d8d9..0000000
--- a/tools/scripts/replace.sh
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/bin/sh
-
-# find and replace string on files
-folder=$1
-oldstring=$2
-newstring=$3
-
-#grep -rl $oldstring $folder | xargs sed -i s@$oldstring@$newstring@g
-grep -rl "$oldstring" $folder | xargs sed -i "s@$oldstring@$newstring@g"
diff --git a/tools/scripts/runvm/c12-dvd b/tools/scripts/runvm/c12-dvd
deleted file mode 100644
index 9cbf201..0000000
--- a/tools/scripts/runvm/c12-dvd
+++ /dev/null
@@ -1,15 +0,0 @@
-export QEMU_AUDIO_DRV=alsa
-
-memory=1024
-
-boot=c
-
-iso=iso/devuan_jessie_1.0.0_amd64_CD.iso
-
-image=img/c12-dvd.qcow2
-
-tap="tap2"
-
-mac="54:60:be:ef:5c:72"
-
-other="-soundhw hda -vga std -display sdl -usb -device usb-ehci  -device usb-host,vendorid=0x13d3,productid=0x5652"
diff --git a/tools/scripts/runvm/profile/crux b/tools/scripts/runvm/profile/crux
deleted file mode 100644
index 672b80d..0000000
--- a/tools/scripts/runvm/profile/crux
+++ /dev/null
@@ -1,7 +0,0 @@
-mac="54:60:be:ef:5c:64"
-memory=1024
-boot=$2
-tap="tap4"
-iso=iso/crux-3.4.iso
-image=img/c14.qcow2
-other="-vga std -display sdl"
diff --git a/tools/scripts/runvm/runvm.sh b/tools/scripts/runvm/runvm.sh
deleted file mode 100644
index 21cd097..0000000
--- a/tools/scripts/runvm/runvm.sh
+++ /dev/null
@@ -1,26 +0,0 @@
-#!/bin/bash
-
-function rmac_addr (){
-printf '54:60:BE:EF:%02X:%02X\n' $((RANDOM%256)) $((RANDOM%256))
-}
-
-source profile/$1
-
-#mac=$(rmac_addr)
-#memory=1024
-#boot=d
-#tap="tap1"
-#iso=iso/crux-3.4.iso
-#image=img/crux-standard.qcow2
-#other="-soundhw hda -vga std -display sdl"
-
-qemu-system-x86_64 \
-    -enable-kvm \
-    -m ${memory} \
-    -boot ${boot} \
-    -cdrom ${iso} \
-    -hda ${image} \
-    -device e1000,netdev=t0,mac=${mac} \
-    -netdev tap,id=t0,ifname=${tap},script=no,downscript=no \
-    ${other} \
-    &
diff --git a/tools/scripts/setup-gitolite.sh b/tools/scripts/setup-gitolite.sh
deleted file mode 100644
index c42db14..0000000
--- a/tools/scripts/setup-gitolite.sh
+++ /dev/null
@@ -1,43 +0,0 @@
-#!/bin/sh
-
-# First we define the function
-ConfirmOrExit ()
-{
-    while true
-    do
-        echo -n "Please confirm (y or n) :"
-        read CONFIRM
-        case $CONFIRM in
-            y|Y|YES|yes|Yes) break ;;
-            n|N|no|NO|No)
-                echo "Aborting - you entered $CONFIRM"
-                exit
-                ;;
-            *) echo "Please enter only y or n"
-        esac
-    done
-    echo "You entered $CONFIRM. Continuing ..."
-}
-
-
-# Absolute path to this script, e.g. /home/user/bin/foo.sh
-SCRIPT=$(readlink -f "$0")
-# Absolute path this script is in, thus /home/user/bin
-SCRIPTPATH=$(dirname "$SCRIPT")
-
-DIR=$(dirname "$SCRIPTPATH");
-DIR_CONF=$DIR"/conf"
-
-echo "SCRIPT=$SCRIPT";
-echo "SCRIPTPATH=$SCRIPTPATH";
-echo "DIR=$DIR";
-echo "DIR_CONF=$DIR_CONF";
-ConfirmOrExit
-
-    prt-get depinst gitolite
-
-    mkdir -p /srv/gitolite
-    useradd -U -d /srv/gitolite gitolite
-    chown gitolite:gitolite /srv/gitolite
-
-exit 0;
diff --git a/tools/scripts/setup-nginx.sh b/tools/scripts/setup-nginx.sh
deleted file mode 100644
index 11065d2..0000000
--- a/tools/scripts/setup-nginx.sh
+++ /dev/null
@@ -1,24 +0,0 @@
-#!/bin/sh
-
-#. `dirname $0`/config-install.sh
-#
-#prt-get depinst nginx
-#
-#cp -R $CONF_DIR/etc/nginx/* /etc/nginx/
-#
-#mkdir /srv/www
-#chown www:www /srv/www
-#
-#usermod -a -g www nginx
-#usermod -m -d /srv/www nginx
-
-openssl genrsa -des3 -out /etc/ssl/keys/nginx.key 2048
-openssl req -new -key /etc/ssl/keys/nginx.key -out /etc/ssl/certs/nginx.csr
-openssl x509 -req -days 365 \
-            -in /etc/ssl/certs/nginx.csr \
-            -signkey /etc/ssl/keys/nginx.key \
-            -out /etc/ssl/certs/nginx.crt
-
-cp /etc/ssl/keys/nginx.key /etc/ssl/keys/nginx.key.pass
-openssl rsa -in /etc/ssl/keys/nginx.key.pass -out /etc/ssl/keys/nginx.key
-
diff --git a/tools/scripts/setup-openssh.sh b/tools/scripts/setup-openssh.sh
deleted file mode 100644
index 14afe8b..0000000
--- a/tools/scripts/setup-openssh.sh
+++ /dev/null
@@ -1,43 +0,0 @@
-#!/bin/sh
-
-# First we define the function
-ConfirmOrExit ()
-{
-    while true
-    do
-        echo -n "Please confirm (y or n) :"
-        read CONFIRM
-        case $CONFIRM in
-            y|Y|YES|yes|Yes) break ;;
-            n|N|no|NO|No)
-                echo "Aborting - you entered $CONFIRM"
-                exit
-                ;;
-            *) echo "Please enter only y or n"
-        esac
-    done
-    echo "You entered $CONFIRM. Continuing ..."
-}
-
-
-# Absolute path to this script, e.g. /home/user/bin/foo.sh
-SCRIPT=$(readlink -f "$0")
-# Absolute path this script is in, thus /home/user/bin
-SCRIPTPATH=$(dirname "$SCRIPT")
-
-DIR=$(dirname "$SCRIPTPATH");
-DIR_CONF=$DIR"/conf"
-
-echo "SCRIPT=$SCRIPT";
-echo "SCRIPTPATH=$SCRIPTPATH";
-echo "DIR=$DIR";
-echo "DIR_CONF=$DIR_CONF";
-ConfirmOrExit
-
-
-    #installer overwrite system init script
-    cp -R $DIR_CONF/etc/ssh/sshd_config /etc/ssh/sshd_config
-
-    sh /etc/rc.d/sshd start
-
-exit 0;
diff --git a/tools/scripts/setup-php.sh b/tools/scripts/setup-php.sh
deleted file mode 100644
index 4c28173..0000000
--- a/tools/scripts/setup-php.sh
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/bin/sh
-
-. `dirname $0`/config-install.sh
-
-prt-get depinst php php-fpm php-gd php-pdo-pgsql php-postgresql
-
-cp /etc/php/php.ini-development /etc/php/php.ini
diff --git a/tools/scripts/setup-postgresql.sh b/tools/scripts/setup-postgresql.sh
deleted file mode 100644
index 4e1ee3a..0000000
--- a/tools/scripts/setup-postgresql.sh
+++ /dev/null
@@ -1,87 +0,0 @@
-#!/bin/sh
-
-# First we define the function
-ConfirmOrExit ()
-{
-    while true
-    do
-        echo -n "Please confirm (y or n) :"
-        read CONFIRM
-        case $CONFIRM in
-            y|Y|YES|yes|Yes) break ;;
-            n|N|no|NO|No)
-                echo "Aborting - you entered $CONFIRM"
-                exit
-                ;;
-            *) echo "Please enter only y or n"
-        esac
-    done
-    echo "You entered $CONFIRM. Continuing ..."
-}
-
-
-# Absolute path to this script, e.g. /home/user/bin/foo.sh
-SCRIPT=$(readlink -f "$0")
-# Absolute path this script is in, thus /home/user/bin
-SCRIPTPATH=$(dirname "$SCRIPT")
-
-DIR=$(dirname "$SCRIPTPATH");
-DIR_CONF=$DIR"/conf"
-
-echo "SCRIPT=$SCRIPT";
-echo "SCRIPTPATH=$SCRIPTPATH";
-echo "DIR=$DIR";
-echo "DIR_CONF=$DIR_CONF";
-ConfirmOrExit
-
-IS_INSTALL=$(prt-get isinst postgresql);
-echo $IS_INSTALL;
-if [ "$IS_INSTALL" = "package postgresql is installed" ]
-then
-    echo "updating postgresql"
-    OLD_VERSION=$(prt-get current postgresql);
-    echo $OLD_VERSION;
-
-    sudo -u postgres pg_dumpall > /srv/pgsql/dump-$OLD_VERSION.sql
-
-    sh /etc/rc.d/postgresql stop
-
-    #extra backup, in case ...
-    tar --xattrs -zcpf /srv/pgsql/data-$OLD_VERSION.tar.gz \
-                    --directory=/srv/pgsql/data .
-
-    rm -R /srv/pgsql/data
-
-    prt-get update postgresql
-
-    NEW_VERSION=$(prt-get current postgresql);
-    echo $NEW_VERSION;
-
-    sudo -u postgres initdb -D /srv/pgsql/data
-
-    rejmerge
-    #installer overwrite system init script
-    cp -R $DIR_CONF/etc/rc.d/postgresql /etc/rc.d/
-
-    sh /etc/rc.d/postgresql start
-    sleep 5
-
-    sudo -u postgres psql -d postgres -f /srv/pgsql/dump-$OLD_VERSION.sql
-
-else
-    echo "install postgresql and dependencies"
-    prt-get depinst postgresql
-
-    cp -R $DIR_CONF/etc/rc.d/postgresql /etc/rc.d/
-
-    mkdir /srv/pgsql/
-    touch /var/log/postgresql
-    chown postgres:postgres /srv/pgsql /var/log/postgresql
-
-    sudo -u postgres initdb -D /srv/pgsql/data
-
-    cp $DIR_CONF/srv/pgsql/data/pg_hba.conf /srv/pgsql/data/
-    chown postgres:postgres /srv/pgsql/data/pg_hba.conf
-fi
-
-exit 0;
diff --git a/tools/scripts/setup-x.sh b/tools/scripts/setup-x.sh
deleted file mode 100644
index 262b4dd..0000000
--- a/tools/scripts/setup-x.sh
+++ /dev/null
@@ -1,96 +0,0 @@
-#!/bin/bash
-
-# Absolute path to this script, e.g. /home/user/bin/foo.sh
-SCRIPT=$(readlink -f "$0")
-# Absolute path this script is in, thus /home/user/bin
-SCRIPTPATH=$(dirname "$SCRIPT")
-
-DIR=$(dirname "$SCRIPTPATH");
-DIR_CONF=$DIR"/conf"
-
-
-
-prt-get depinst xorg-server \
-	xorg-xinit \
-	xorg-xrdb \
-	xorg-xdpyinfo \
-	xorg-xauth \
-	xorg-xmodmap \
-	xorg-xrandr \
-	xorg-xgamma \
-	xorg-xf86-input-evdev \
-	xorg-xf86-input-synaptics \
-	xsel \
-	xkeyboard-config
-
-prt-get depinst xorg-font-util \
-	xorg-font-alias \
-	xorg-font-dejavu-ttf \
-	xorg-font-cursor-misc \
-	xorg-font-misc-misc \
-	console-font-terminus \
-	xorg-font-terminus \
-	xorg-font-mutt-misc
-
-prt-get search xorg-font-bitstream | xargs sudo prt-get depinst
-prt-get search xorg-font-bh | xargs sudo prt-get depinst
-
-#prt-get search otf- | xargs sudo prt-get depinst
-#prt-get depinst otf-sourcecode
-
-prt-get depinst \
-            alsa-utils \
-            libdrm \
-            mesa3d \
-            ffmpeg \
-            gstreamer \
-            gstreamer-vaapi \
-            gst-plugins-base \
-            gst-plugins-good \
-            gst-plugins-bad \
-            gst-plugins-ugly \
-            cmus \
-            dmenu \
-            st \
-            gparted \
-            gimp \
-            libreoffice \
-            ca-certificates \
-            linux-pam \
-            gstreamer \
-            libgd \
-            icu \
-            syndaemon \
-	    firefox
-
-prt-get depinst \
-	openbox \
-	dwm \
-       	spectrwm \
-	mate
-
-ConfirmOrExit () {
-    while true
-    do
-        echo -n "Please confirm (y or n) :"
-        read CONFIRM
-        case $CONFIRM in
-            y|Y|YES|yes|Yes) break ;;
-            n|N|no|NO|No)
-                echo "Aborting - you entered $CONFIRM"
-                exit
-                ;;
-            *) echo "Please enter only y or n"
-        esac
-    done
-    echo "You entered $CONFIRM. Continuing ..."
-}
-
-echo "SCRIPT=$SCRIPT";
-echo "SCRIPTPATH=$SCRIPTPATH";
-echo "DIR=$DIR";
-echo "DIR_CONF=$DIR_CONF";
-ConfirmOrExit
-
-cp -R $DIR_CONF/etc/X11/* /etc/X11/
-