diff options
author | Christian Rößler | 2015-06-24 10:56:24 +0200 |
---|---|---|
committer | Christian Rößler | 2015-06-24 10:56:24 +0200 |
commit | f99af2cddc247c9597fea30505153a8d6eb835fc (patch) | |
tree | f9b62ec8928a6c516729d2b27559a56b1b6ba217 /satellit_installer/static_files | |
parent | [SSPS] systemd service files re-checked, simplified. (diff) | |
download | setup-scripts-f99af2cddc247c9597fea30505153a8d6eb835fc.tar.gz setup-scripts-f99af2cddc247c9597fea30505153a8d6eb835fc.tar.xz setup-scripts-f99af2cddc247c9597fea30505153a8d6eb835fc.zip |
[SSPS] WARNING: syncdaemon removed!
Diffstat (limited to 'satellit_installer/static_files')
5 files changed, 4 insertions, 155 deletions
diff --git a/satellit_installer/static_files/logging/85-syncdaemon.conf b/satellit_installer/static_files/logging/85-syncdaemon.conf deleted file mode 100644 index 7185787..0000000 --- a/satellit_installer/static_files/logging/85-syncdaemon.conf +++ /dev/null @@ -1,2 +0,0 @@ -:app-name, isequal, "syncdaemon" -/var/log/syncdaemon.log -& ~ diff --git a/satellit_installer/static_files/logging/satellite-logrotate b/satellit_installer/static_files/logging/satellite-logrotate index 8a06345..2d1d946 100644 --- a/satellit_installer/static_files/logging/satellite-logrotate +++ b/satellit_installer/static_files/logging/satellite-logrotate @@ -1,6 +1,5 @@ /var/log/dmsd.log /var/log/taskmanager.log -/var/log/syncdaemon.log { rotate 7 daily diff --git a/satellit_installer/static_files/rclocal_script.sh b/satellit_installer/static_files/rclocal_script.sh index 8d70942..46ae9aa 100644 --- a/satellit_installer/static_files/rclocal_script.sh +++ b/satellit_installer/static_files/rclocal_script.sh @@ -67,8 +67,8 @@ chmod 600 /root/mysqlpass echo -n "Konfigurationsdateien werden aktualisiert..." >> /root/init.log # bwLehrpool mysql pass -# Patch dmsd, syncdaemon, vmchooser-query-script -patchfiles "%MYSQL_BWLEHRPOOL_PASS%" "$MYSQL_BWLEHRPOOL_NEW" "$DMSDDIR/Server_Config.ini" "/opt/syncdaemon/config/mysql.properties" "/srv/openslx/www/vmchooser/list.php" +# Patch dmsd, vmchooser-query-script +patchfiles "%MYSQL_BWLEHRPOOL_PASS%" "$MYSQL_BWLEHRPOOL_NEW" "$DMSDDIR/Server_Config.ini" "/srv/openslx/www/vmchooser/list.php" # Pureftpd patchfiles 'MYSQLPassword.*$' "MYSQLPassword $MYSQL_BWLEHRPOOL_NEW" "/etc/pure-ftpd/db/mysql.conf" @@ -83,8 +83,7 @@ echo " ok." >> /root/init.log echo -n "Dienste werden aktiviert..." >> /root/init.log -which systemctl >/dev/null -if [ $? -eq 0 ]; then +if [ $(ps -p 1 -o comm=) = systemd ]; then echo "Systemd erkannt (systemctl vorhanden)." >> /root/init.log if [ ! -f /etc/systemd/system/dmsd.service ]; then cat > /etc/systemd/system/dmsd.service <<-HEREDOC @@ -120,24 +119,7 @@ if [ $? -eq 0 ]; then SOMEWHEREDOC echo "taskmanager.service geschrieben." >> /root/init.log fi - if [ ! -f /etc/systemd/system/syncdaemon.service ]; then - cat > /etc/systemd/system/syncdaemon.service <<-ANOTHERDOC - [Unit] - Description=The syncdaemon is a bwLehrpool syncing daemon - - [Service] - User=syncdaemon - Group=images - WorkingDirectory=$SYNCDAEMONDIR - ExecStart=$(which java) -Xmx96M -jar syncdaemon.jar - Restart=always - - [Install] - WantedBy=multi-user.target - ANOTHERDOC - echo "syncdaemon.service geschrieben." >> /root/init.log - fi - for i in dmsd.service taskmanager.service syncdaemon.service; do + for i in dmsd.service taskmanager.service; do systemctl enable $i [ $? -ne 0 ] && echo "Warnung - konnte systemd-Service $i nicht aktivieren!" >> /root/init.log done @@ -151,11 +133,6 @@ else if ! grep -q "tman.*respawn" /etc/inittab; then echo "tman:2345:respawn:$TASKMANDIR/taskmanager.sh" >> /etc/inittab fi - - # inittab-entry syncdaemon: - if ! grep -q "synd.*respawn" /etc/inittab; then - echo "synd:2:once:/opt/syncdaemon/syncdaemon.sh" >> /etc/inittab - fi fi echo -n " ok." >> /root/init.log diff --git a/satellit_installer/static_files/syncdaemon/control.sh b/satellit_installer/static_files/syncdaemon/control.sh deleted file mode 100755 index 51ef8ab..0000000 --- a/satellit_installer/static_files/syncdaemon/control.sh +++ /dev/null @@ -1,112 +0,0 @@ -#!/bin/bash - -DIR="/opt/syncdaemon" -JAR="syncdaemon.jar" - -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 syncdaemon..." - 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!" -} - -op_checkconfig () { - java -Xmx64M -jar "$JAR" --checkconfig - RET=$? - exit "$RET" -} - -op_import () { - # --import <ORGANIZATIONNAME> <MODULUS> <PRIV_EXP> <PUB_EXP> - java -Xmx64M -jar "$JAR" --import "$@" - RET=$? - chmod 0600 "$DIR/config/identity.properties" - exit "$RET" -} - -op_submitkey () { - # --submitkey <IPADDRESS> - java -Xmx64M -jar "$JAR" --submitkey "$@" - RET=$? - exit "$RET" -} - -op_updateaddress () { - # --updateaddress <IPADDRESS> - java -Xmx64M -jar "$JAR" --updateaddress "$@" - RET=$? - exit "$RET" -} - -op_genid () { - # --genid <ORGANIZANTIONNAME> - java -Xmx64M -jar "$JAR" --genid "$@" - RET=$? - chmod 0600 "$DIR/config/identity.properties" - exit "$RET" -} - -case "$MODE" in -start) - op_start ;; -stop) - op_stop ;; -checkconfig) - op_checkconfig ;; -submitkey) - op_submitkey "$@" ;; -updateaddress) - op_updateaddress "$@" ;; -genid) - op_genid "$@" ;; -import) - shift - op_import "$@" - ;; -*) - echo "Invalid operation mode: $MODE" >&2 - exit 1 - ;; -esac - -exit 0 - diff --git a/satellit_installer/static_files/syncdaemon/syncdaemon.sh b/satellit_installer/static_files/syncdaemon/syncdaemon.sh deleted file mode 100755 index 0433fa1..0000000 --- a/satellit_installer/static_files/syncdaemon/syncdaemon.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/sh -# This is a simple wrapper script for the Sync-Daemon -# Running as root from inittab - -DIR="/opt/syncdaemon" -JAR="syncdaemon.jar" -USER="syncdaemon" -LOGTAG="syncdaemon" -DISPLAYNAME="syncdaemon" - - -. "/opt/java-daemon.inc" - |