diff options
author | punk <punk@libernaut> | 2021-04-21 15:26:19 +0100 |
---|---|---|
committer | punk <punk@libernaut> | 2021-04-21 15:26:19 +0100 |
commit | eac48b5a8d709135a95abcc2243b369095f074f4 (patch) | |
tree | a2e34d995cef5ac8068ec7047e93b1125c80d175 /core/conf/rc.d | |
parent | 3bd43803fc8cb7a39a87394cb7c491ddc151e06b (diff) | |
parent | 452477a2635d85ecf772a5242ce97d9479503bb3 (diff) | |
download | doc-eac48b5a8d709135a95abcc2243b369095f074f4.tar.gz |
release 0.7.0
Diffstat (limited to 'core/conf/rc.d')
-rwxr-xr-x | core/conf/rc.d/distccd | 33 | ||||
-rwxr-xr-x | core/conf/rc.d/fcgiwrap | 41 | ||||
-rwxr-xr-x | core/conf/rc.d/git-daemon | 43 | ||||
-rw-r--r-- | core/conf/rc.d/iptables | 22 | ||||
-rwxr-xr-x | core/conf/rc.d/net | 54 | ||||
-rwxr-xr-x | core/conf/rc.d/postgresql | 16 | ||||
-rwxr-xr-x | core/conf/rc.d/wlan | 56 |
7 files changed, 0 insertions, 265 deletions
diff --git a/core/conf/rc.d/distccd b/core/conf/rc.d/distccd deleted file mode 100755 index 65a166d..0000000 --- a/core/conf/rc.d/distccd +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/bin/env bash -# -# /etc/rc.d/distccd: start/stop distcc daemon -# - -. /etc/distcc.conf -if [ -z "$DISTCC_ALLOW" ]; then - echo "Please define a range of IPs allowed to connect to this distccd" - echo "host in DISTCC_ALLOW in /etc/rc.conf. More detailed information" - echo "can be found in the distcc's README package." - exit 1 -fi - -DISTCC_USER="${DISTCC_USER:=nobody}" -DISTCC_LOG_LEVEL="${DISTCC_LOG_LEVEL:=notice}" - -case $1 in -start) - /usr/sbin/distccd --daemon --user "$DISTCC_USER" --allow "$DISTCC_ALLOW" --log-level "$DISTCC_LOG_LEVEL" - ;; -stop) - killall -q /usr/sbin/distccd - ;; -restart) - $0 stop - $0 start - ;; -*) - echo "usage: $0 [start|stop|restart]" - ;; -esac - -# End of file diff --git a/core/conf/rc.d/fcgiwrap b/core/conf/rc.d/fcgiwrap deleted file mode 100755 index 2059848..0000000 --- a/core/conf/rc.d/fcgiwrap +++ /dev/null @@ -1,41 +0,0 @@ -#!/bin/sh -# -# /etc/rc.d/bird: start/stop fcgiwrapper -# - -SSD=/sbin/start-stop-daemon -NAME=fcgiwrap -PROG=/usr/bin/spawn-fcgi -USER=www -GROUP=gitolite -PIDFILE=/var/run/spawn_${NAME}.pid -SOCKET=/var/run/fcgiwrap.sock -OPTS="-u $USER -g $GROUP -P $PIDFILE -M 0660 -s $SOCKET -- /usr/sbin/${NAME}" - - -case $1 in - start) - echo "Starting ${NAME}..." - $SSD --background --user $USER --quiet --start --pidfile $PIDFILE --exec $PROG -- $OPTS - ;; -stop) - echo "Stopping ${NAME}..." - $SSD --stop --remove-pidfile --retry 10 --pidfile $PIDFILE - ;; -restart) - echo "Restarting ${NAME}..." - $0 stop - $0 start - ;; -status) - $SSD --status --pidfile $PIDFILE - case $? in - 0) echo "$PROG is running with pid $(cat $PIDFILE )" ;; - 3) echo "$PROG is not running" ;; - 4) echo "Unable to determine the program status" ;; - esac - ;; -*) - echo "usage: $0 [start|stop|restart|status]" - ;; -esac diff --git a/core/conf/rc.d/git-daemon b/core/conf/rc.d/git-daemon deleted file mode 100755 index 41793eb..0000000 --- a/core/conf/rc.d/git-daemon +++ /dev/null @@ -1,43 +0,0 @@ -#!/bin/sh - -SSD=/sbin/start-stop-daemon -NAME=git-daemon -PROG=$(git --exec-path)/${NAME} -USER=gitolite -GROUP=gitolite -PIDFILE=/var/run/git-daemon.pid -REPOS=/srv/gitolite/repositories -OPTS="--verbose --reuseaddr --base-path=${REPOS}" - -case $1 in - start) - echo "Starting ${NAME}..." - $SSD --start \ - --pidfile ${PIDFILE} \ - --exec ${PROG} -- ${OPTS} \ - --detach --pid-file=${PIDFILE} \ - --user=${USER} --group=${GROUP} - - ;; - stop) - echo "Stopping ${NAME}..." - $SSD --stop --quiet --name git-daemon \ - --pidfile ${PIDFILE} - ;; - restart) - echo "Restarting ${NAME}..." - $0 stop - $0 start - ;; - status) - $SSD --status --pidfile $PIDFILE - case $? in - 0) echo "$PROG is running with pid $(cat $PIDFILE )" ;; - 3) echo "$PROG is not running" ;; - 4) echo "Unable to determine the program status" ;; - esac - ;; - *) - echo "usage: $0 [start|stop|restart|status]" - ;; -esac diff --git a/core/conf/rc.d/iptables b/core/conf/rc.d/iptables deleted file mode 100644 index 44f6bb2..0000000 --- a/core/conf/rc.d/iptables +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/bash - -case $1 in - start) - echo "clear all iptables tables" - #nohup bash /etc/iptables/ipt-start.sh & - nohup bash /etc/iptables/ipt-start.sh & - ;; - stop) - echo "clear all iptables tables" - nohup bash /etc/iptables/ipt-stop.sh & - ;; - restart) - $0 start - ;; - status) - /usr/sbin/iptables -L -n -v - ;; - *) - echo "Usage: $0 [start|stop]" - ;; -esac diff --git a/core/conf/rc.d/net b/core/conf/rc.d/net deleted file mode 100755 index a4c566a..0000000 --- a/core/conf/rc.d/net +++ /dev/null @@ -1,54 +0,0 @@ -#!/bin/sh -# -# /etc/rc.d/net: start/stop network interface -# - -# Connection type: "DHCP" or "static" -TYPE="DHCP" - -# For "static" connections, specify your settings here: -# To see your available devices run "ip link". -DEV=ens3 -ADDR=192.168.1.100 -MASK=24 -GW=192.168.1.1 - -# Optional settings: -DHCPOPTS="-t 10" - -/sbin/ifconfig dummy down > /dev/null 2>&1 -/sbin/ifconfig dummy0 down > /dev/null 2>&1 -/sbin/ifconfig ifb0 down > /dev/null 2>&1 -/sbin/ifconfig ifb1 down > /dev/null 2>&1 -/sbin/ifconfig bond0 down > /dev/null 2>&1 - -case $1 in - start) - if [ "${TYPE}" = "DHCP" ]; then - /sbin/dhcpcd ${DHCPOPTS} - else - /sbin/ip addr add ${ADDR}/${MASK} dev ${DEV} broadcast + - /sbin/ip link set ${DEV} up - /sbin/ip route add default via ${GW} - fi - ;; - stop) - if [ "${TYPE}" = "DHCP" ]; then - /sbin/dhcpcd -x - else - /sbin/ip route del default - /sbin/ip link set ${DEV} down - /sbin/ip addr del ${ADDR}/${MASK} dev ${DEV} - fi - ;; - restart) - $0 stop - $0 start - ;; - *) - echo "Usage: $0 [start|stop|restart]" - ;; -esac - -# End of file - diff --git a/core/conf/rc.d/postgresql b/core/conf/rc.d/postgresql deleted file mode 100755 index 5f0762a..0000000 --- a/core/conf/rc.d/postgresql +++ /dev/null @@ -1,16 +0,0 @@ -# -# /etc/rc.d/postgresql: start, stop or restart PostgreSQL server postmaster -# - -PG_DATA=/srv/pgsql/data - -case "$1" in - start|stop|status|restart|reload) - sudo -u postgres pg_ctl -D "$PG_DATA" -l /var/log/postgresql "$1" - ;; - *) - echo "usage: $0 start|stop|restart|reload|status" - ;; -esac - -# End of file diff --git a/core/conf/rc.d/wlan b/core/conf/rc.d/wlan deleted file mode 100755 index 9a2f935..0000000 --- a/core/conf/rc.d/wlan +++ /dev/null @@ -1,56 +0,0 @@ -#!/bin/sh -# -# /etc/rc.d/wlan: start/stop wireless interface -# - -DEV=wlp3s0 - - -SSD=/sbin/start-stop-daemon -PROG_DHCP=/sbin/dhcpcd -PROG_WIFI=/usr/sbin/wpa_supplicant -PID_DHCP=/var/run/dhcpcd.pid -PID_WIFI=/var/run/wpa_supplicant.pid - -OPTS_DHCP="--waitip -h $(/bin/hostname) -z $DEV" -OPTS_WIFI="-B -P $PID_WIFI -D nl80211,wext -c /etc/wpa_supplicant.conf -i $DEV" - - -print_status() { - $SSD --status --pidfile $2 - case $? in - 0) echo "$1 is running with pid $(cat $2)" ;; - 1) echo "$1 is not running but the pid file $2 exists" ;; - 3) echo "$1 is not running" ;; - 4) echo "Unable to determine the program status" ;; - esac -} - -case $1 in - start) - $SSD --start --pidfile $PID_WIFI --exec $PROG_WIFI -- $OPTS_WIFI && \ - $SSD --start --pidfile $PID_DHCP --exec $PROG_DHCP -- $OPTS_DHCP - RETVAL=$? - ;; - stop) - ( $SSD --stop --retry 10 --pidfile $PID_DHCP - $SSD --stop --retry 10 --pidfile $PID_WIFI ) - RETVAL=$? - ;; - restart) - $0 stop - $0 start - ;; - status) - print_status $PROG_WIFI $PID_WIFI - print_status $PROG_DHCP $PID_DHCP - ;; - *) - echo "Usage: $0 [start|stop|restart|status]" - ;; -esac - -exit $RETVAL - -# End of file - |