Jump to content

Ubuntu update


Recommended Posts

And, some modification with status update email.

 

#!/bin/bash
tmpfile=$( /bin/mktemp -t )
from= xxx@xxxx.xxx
to= yyy@yyyy.yyy
/bin/echo return-path: $to >> $tmpfile
/bin/echo for: $to >> $tmpfile
/bin/echo from: $from >> $tmpfile
/bin/echo to: $to >> $tmpfile
/bin/echo subject: Ubuntu Update Pulseway Script Status >> $tmpfile
/bin/echo Message: >> $tmpfile
/bin/echo >> $tmpfile
/bin/echo APT-GET Update was run: $( /bin/date +%c ) >> $tmpfile
/bin/echo >> $tmpfile
/bin/echo -n "Result: " >> $tmpfile
/usr/bin/apt-get -qy update > /dev/null
/usr/bin/apt-get -qy dist-upgrade | grep -i installed >> $tmpfile
/bin/echo >> $tmpfile
/bin/cat $tmpfile | sendmail -t
/bin/rm $tmpfile
exit 0

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Similar Content

    • By Leah96xxx
      I am trying to configure Pulseway on my Ubuntu Server 20.04 LTS machine, but I'm having issues getting it to recognise systemd services.
      The services I want to monitor are smbd, plexmediaserver and clamav-freshclam. Regardless of what configuration I use, none of these services are even recognised by Pulseway let alone monitored. I have also tried setting each service as "NONE", "UPSTART" and "SYSVINIT" but nothing seems to work.
      The strange part is that ssh is monitored despite the fact that it's configuration is identical to the others.
      Here is a screenshot of my configuration:
      Can someone please help me out here? Is there something I'm missing?
      EDIT: Never mind. It suddenly started working after I posted this.
    • By Astrofrite
      Hi, i want to know how i can monitor the dropbox daemon on linux, i'v tried things with workflow but when i stop the service manualy it won't send me a notification or try to restart the service, and that is bothering me becaus on our servers we need to have dropbox running all the time for our application, i know that dropbox is weird on linux, it won't show with systemctl, but it's still like a daemon.
      I'm running debian buster machine all up to date with the last pulseway agent
       
    • By Cilusse
      Hello there,
      I was in the process of configuring my Pulseway agent on a VPS running Ubuntu Server 20.04 and I ran in this interesting bug.
      Even using the sample config provided by the agent, uncommenting the Ping Responses bloc throws this error in the log, and prevents the service from starting.
      vps pulseway: Starting Pulseway Daemon version 6.5 (2019082205) vps pulseway: Configuration: Values for 'Milliseconds' attribute at 'PingResponse' node 10.6.0.53(1) should be between 1 and 1000 vps systemd: pulseway.service: Main process exited, code=exited, status=1/FAILURE  
      The PingResponse bloc in /etc/pulseway/config.xml looks like this:
      <PingResponses> <PingResponse Address="10.6.0.53" Milliseconds="1500" Minutes="1" PriorityOnSlowResponse="1" PriorityOnNoResponse="1" Alias="vps DNS notif" Enabled="true"/> </PingResponses>  
      So then I tried many Milliseconds values between 1 and 1000 but the same exact error always comes back.
      Is this a known issue or is there anything wrong with my setup?
       
      Many thanks to anyone who can help,
      Best,
    • By TheTechNerd
      Hi. I have a CentOS machine that I've been trying to get pulseway working on. I could not find anyone having the same problem.
      I have successfully installed pulseway, or at least the system thinks so. I edited the config file and removed the sample text from the name. However, when I attempt to start pulseway, the terminal gives me no indication of success or failure. However, when I check the systemctl logs, it claims that pulseway failed to start because of a missing file. I searched for the file, and it was indeed there. Can anyone help me with this?
       
      Here's what it says:
      "delta systemd[11600]: Failed at step EXEC spawning /usr/sbin/pulsewayd: No such file or directory"
       
      ***This problem has been solved, I was unaware that my server was x64 based***
    • By Brayden
      Is there a way I could Ping google.com for example and if below x milliseconds then create error sending notification to my Pulseway devices?
×
×
  • Create New...