diff --git a/usr/lib/init/init-funcs.sh b/usr/lib/init/init-funcs.sh index e4b7512..3831ef6 100644 --- a/usr/lib/init/init-funcs.sh +++ b/usr/lib/init/init-funcs.sh @@ -63,6 +63,6 @@ check() { #--- notify func --- notify() { - printf "$BBLUE**$BYELLOW $1\n$RESET" + printf "$BBLUE**$BGREEN $1\n$RESET" } #------------------- diff --git a/usr/lib/init/services/ftpd.service b/usr/lib/init/services/ftpd.service index 58341cf..0ef87d9 100755 --- a/usr/lib/init/services/ftpd.service +++ b/usr/lib/init/services/ftpd.service @@ -9,7 +9,7 @@ start() { notify "Starting ftpd" tcpsvd -vE 0.0.0.0 21 ftpd -w -S -A /srv/ftpd &>/dev/null & check $? "start ftpd" - echo $(pgrep tcpsvd) > /ar/run/ftpd.pid + echo $(pgrep tcpsvd) > /var/run/ftpd.pid return $? } diff --git a/usr/lib/init/services/hostname.service b/usr/lib/init/services/hostname.service index ad9df44..00dc75b 100755 --- a/usr/lib/init/services/hostname.service +++ b/usr/lib/init/services/hostname.service @@ -7,7 +7,7 @@ start() { notify "Settin up hostname" - /usr/bin/hosname -F /etc/hostname + /usr/bin/hostname -F /etc/hostname check $? "Set up hostname" return $? } diff --git a/usr/lib/init/services/klogd.service b/usr/lib/init/services/klogd.service index 0beb098..9854eba 100755 --- a/usr/lib/init/services/klogd.service +++ b/usr/lib/init/services/klogd.service @@ -28,4 +28,4 @@ case "$1" in help ;; esac -reurn $? +return $? diff --git a/usr/lib/init/services/openrouterinit.service b/usr/lib/init/services/openrouterinit.service index e453cb2..1cdfd50 100644 --- a/usr/lib/init/services/openrouterinit.service +++ b/usr/lib/init/services/openrouterinit.service @@ -7,12 +7,12 @@ start() { notify "Starting openrouter software" - /usr/bin/auth_service &>/dev/null + /usr/bin/auth_service &>/dev/null & check $? "start auth_service" - echo $(pgrep auth_service) > /var/run/auth_service.pid - /usr/bin/openrouter &> /dev/null + echo $! > /var/run/auth_service.pid + /usr/bin/openrouter &> /dev/null & check $? "start openrouter" - echo $(pgrep openrouter) > /var/run/openrouter.pid + echo $! > /var/run/openrouter.pid return $? } diff --git a/usr/lib/init/services/sshd.service b/usr/lib/init/services/sshd.service index 4698f67..2b9a405 100755 --- a/usr/lib/init/services/sshd.service +++ b/usr/lib/init/services/sshd.service @@ -9,7 +9,7 @@ start() { notify "Starting sshd" /usr/bin/sshd -D & check $? "start sshd" - echo $(pgrep sshd) > /var/run/sshd.pid + echo $! > /var/run/sshd.pid return $? } diff --git a/usr/lib/init/services/sysctl.service b/usr/lib/init/services/sysctl.service index 596e8b4..71f5888 100755 --- a/usr/lib/init/services/sysctl.service +++ b/usr/lib/init/services/sysctl.service @@ -7,7 +7,7 @@ start() { notify "Setting up sysctl" - sysctl -p & /dev/null + sysctl -p &> /dev/null check $? "setting up sysctl" return $? } diff --git a/usr/lib/init/services/telnetd.service b/usr/lib/init/services/telnetd.service index cacbd9e..e651034 100755 --- a/usr/lib/init/services/telnetd.service +++ b/usr/lib/init/services/telnetd.service @@ -9,13 +9,13 @@ start() { notify "Starting telnetd" /usr/bin/telnetd -p 23 check $? "start telnetd" - echo $(gprep telnetd) > /var/run/telnetd.pid + echo $(pgrep telnetd) > /var/run/telnetd.pid return $? } stop() { notify "Stopping telnetd" - kill $(cat /var/run/telnetd.pid) + kill $(cat /var/run/telnetd.pid | awk '{ print $2 }') check $? "stop telnetd" rm /var/run/telnetd.pid &> /dev/null return $?