fixes, prometheus, lots of stuff
[distro-setup] / filesystem / usr / local / bin / myupgrade
index c206f8f7888127295a9e08864d616360122d2b12..fb8d1d05643c05b9ffb87a13d96024a1de74ce14 100755 (executable)
@@ -25,7 +25,7 @@ d() {
   if [[ $DEBUG ]]; then
     pee cat "wall -n"
   else
-    echo ok | sed 's/^/myupgrade /' | pee logger "wall -n"
+    sed 's/^/myupgrade /' | pee logger "wall -n"
   fi
 }
 myreboot() {
@@ -52,8 +52,9 @@ myreboot() {
 # We should figure some workaround.
 
 if ! out=$(/sbin/needrestart -p 2>&1); then
-  printf "%s\n\n" "$out"
-  if [[ $HOSTNAME != "$MAIL_HOST" ]]; then
+  if [[ $HOSTNAME == "$MAIL_HOST" ]]; then
+    needrestart -r l
+  else
     myreboot
   fi
 fi