fix errors and warnings in scripts
This commit is contained in:
@@ -63,6 +63,6 @@ check() {
|
||||
|
||||
#--- notify func ---
|
||||
notify() {
|
||||
printf "$BBLUE**$BYELLOW $1\n$RESET"
|
||||
printf "$BBLUE**$BGREEN $1\n$RESET"
|
||||
}
|
||||
#-------------------
|
||||
|
||||
@@ -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 $?
|
||||
}
|
||||
|
||||
|
||||
@@ -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 $?
|
||||
}
|
||||
|
||||
@@ -28,4 +28,4 @@ case "$1" in
|
||||
help
|
||||
;;
|
||||
esac
|
||||
reurn $?
|
||||
return $?
|
||||
|
||||
@@ -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 $?
|
||||
}
|
||||
|
||||
|
||||
@@ -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 $?
|
||||
}
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
start() {
|
||||
notify "Setting up sysctl"
|
||||
sysctl -p & /dev/null
|
||||
sysctl -p &> /dev/null
|
||||
check $? "setting up sysctl"
|
||||
return $?
|
||||
}
|
||||
|
||||
@@ -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 $?
|
||||
|
||||
Reference in New Issue
Block a user