summaryrefslogtreecommitdiffstats
path: root/satellit_installer/static_files
diff options
context:
space:
mode:
authorSimon Rettberg2015-09-18 14:48:06 +0200
committerSimon Rettberg2015-09-18 14:48:06 +0200
commit02e5810d096779f2eec58c39406d573682526718 (patch)
tree375fdd27e7a03cbb6df6676dcb31ea4417275bf6 /satellit_installer/static_files
parent[SSPS] Revert giving dmsd an own group: Doesn't work with NFS (diff)
downloadsetup-scripts-02e5810d096779f2eec58c39406d573682526718.tar.gz
setup-scripts-02e5810d096779f2eec58c39406d573682526718.tar.xz
setup-scripts-02e5810d096779f2eec58c39406d573682526718.zip
[SSPS] Remove obsolete files
Diffstat (limited to 'satellit_installer/static_files')
-rwxr-xr-xsatellit_installer/static_files/dmsd/control.sh63
-rwxr-xr-xsatellit_installer/static_files/dmsd/dmsd.sh13
-rw-r--r--satellit_installer/static_files/java-daemon.inc57
-rwxr-xr-xsatellit_installer/static_files/pidtree19
-rwxr-xr-xsatellit_installer/static_files/taskmanager.sh4
5 files changed, 0 insertions, 156 deletions
diff --git a/satellit_installer/static_files/dmsd/control.sh b/satellit_installer/static_files/dmsd/control.sh
deleted file mode 100755
index 7d43b61..0000000
--- a/satellit_installer/static_files/dmsd/control.sh
+++ /dev/null
@@ -1,63 +0,0 @@
-#!/bin/sh
-
-DIR="/opt/dmsd"
-
-MODE=$1
-FLAG="$DIR/flag/run"
-STATUS="$DIR/flag/running"
-
-if [ -z "$MODE" ]; then
- echo "No option given!" >&2
- exit 1
-fi
-
-ispid () {
- [ -n "$1" ] && [ -d "/proc/$1" ]
-}
-
-cd "$DIR" || exit 1
-
-op_start () {
- touch "$FLAG"
-}
-
-op_stop () {
- echo "Stopping bwLehrpoolSuite Server..."
- local PID=
- local p=
- local PROC=
- # Delete run-flag
- rm -f -- "$FLAG"
- [ -r "$STATUS" ] && PID=$(cat "$STATUS")
- ispid "$PID" || PID=
- # If PID is still set, we can kill it....
- if [ -n "$PID" ]; then
- kill -TERM $(pidtree "$PID") 2>/dev/null
- for p in 1 2 3 4 force error; do
- ispid "$PID" || break
- if [ "$p" = "error" ]; then
- echo "...FAILED!"
- exit 1
- fi
- echo "..."
- sleep 1
- [ "$p" = "force" ] && kill -9 "$PID"
- done
- fi
- [ -r "$STATUS" ] && sleep 1
- echo "OK!"
-}
-
-case "$MODE" in
-start)
- op_start ;;
-stop)
- op_stop ;;
-*)
- echo "Invalid operation mode: $MODE" >&2
- exit 1
- ;;
-esac
-
-exit 0
-
diff --git a/satellit_installer/static_files/dmsd/dmsd.sh b/satellit_installer/static_files/dmsd/dmsd.sh
deleted file mode 100755
index b6a19f6..0000000
--- a/satellit_installer/static_files/dmsd/dmsd.sh
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/bin/sh
-# This is a simple wrapper script for the Dozentenmodul server part
-# Running as root from inittab
-
-DIR="/opt/dmsd"
-JAR="bwLehrpoolSuite_Server.jar"
-USER="dmsd"
-LOGTAG="dmsd"
-DISPLAYNAME="bwLehrpoolSuite Server"
-
-
-. "/opt/java-daemon.inc"
-
diff --git a/satellit_installer/static_files/java-daemon.inc b/satellit_installer/static_files/java-daemon.inc
deleted file mode 100644
index f3f42e2..0000000
--- a/satellit_installer/static_files/java-daemon.inc
+++ /dev/null
@@ -1,57 +0,0 @@
-# Included by respawning daemons after setting up all vars
-# This could be much nicer...
-
-# Check if required vars are set and files exist.
-for var in DIR JAR USER LOGTAG DISPLAYNAME; do
- if [ "x$(eval echo "\$$var")" = "x" ]; then # dash compatible
- echo "In $(pwd)/$0: $var not set!" | logger
- exit 1
- fi
-done
-if [ ! -e "${DIR}/${JAR}" ]; then
- echo "Jarfile for ${DISPLAYNAME} does not exist in ${DIR}!" | logger
- exit 1
-fi
-if ! id -u "${USER}"; then
- echo "User ${USER} for service ${DISPLAYNAME} dies not exist!" | logger
- exit 1
-fi
-
-FLAGDIR="${DIR}/flag"
-
-# If we're root we switch to $USER
-if [ "x$(id -u)" = "x0" ]; then
- [ "x$1" = "x--su" ] && exit 1
- mkdir -p -m 0755 "${FLAGDIR}"
- chown "${USER}" "${FLAGDIR}"
- rm -f -- "${FLAGDIR}/running"
- exec sudo -n -u "${USER}" "$0" --su # Use exec to save a pid and make sure we don't continue if sudo fails or the script exits for some reason
-fi
-
-if ! cd "${DIR}"; then
- echo "Could not cd to ${DIR}" | logger
- exit 1
-fi
-
-DELAY=10
-while true; do
- if [ -e "${FLAGDIR}/run" ]; then
- (
- java -Xmx96M -jar "${JAR}" 2>&1 | logger -t "${LOGTAG}"
- ) & # subshell to get separate parent pid
- PID=$!
- echo "$PID" > "${FLAGDIR}/running"
- wait $PID
- if [ -e "${FLAGDIR}/run" ]; then # runflag still there, crash?
- slxlog "event" "warning" "${DISPLAYNAME}: Unexpected exit/crash." &
- DELAY=$(( $DELAY + 10 ))
- else # exit ok, reset delay
- DELAY=10
- fi
- rm -f -- "${FLAGDIR}/running"
- else # should not run, also reset delay
- DELAY=10
- fi
- sleep "${DELAY}"
-done
-
diff --git a/satellit_installer/static_files/pidtree b/satellit_installer/static_files/pidtree
deleted file mode 100755
index 505d2be..0000000
--- a/satellit_installer/static_files/pidtree
+++ /dev/null
@@ -1,19 +0,0 @@
-#!/bin/bash
-
-[ -n "$ZSH_VERSION" ] && setopt shwordsplit
-declare -A CHILDS
-while read P PP;do
- CHILDS[$PP]+=" $P"
-done < <(ps -e -o pid= -o ppid=)
-
-walk() {
- [ -d "/proc/$1" ] && echo $1
- for i in ${CHILDS[$1]};do
- walk $i
- done
-}
-
-for i in "$@";do
- walk $i
-done
-
diff --git a/satellit_installer/static_files/taskmanager.sh b/satellit_installer/static_files/taskmanager.sh
deleted file mode 100755
index 39b6ec7..0000000
--- a/satellit_installer/static_files/taskmanager.sh
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/bin/sh
-# This is a simple wrapper script for the Taskmanager
-
-exec /bin/su -s /bin/sh -c 'cd /opt/taskmanager; java -Xmx80M -jar ./taskmanager.jar 2>&1 | logger -t taskmanager; sleep 5' taskmanager