Code Monkey home page Code Monkey logo

autoupdater's Introduction

autoupdater

Autoupdater uses systemd to automatically run apt-get update, upgrade, autoremove, and autoclean to update Ubuntu/Debian-based systems on a schedule.

The provided deb package will install 3 files on your system

  • /usr/bin/autoupdater
    This is the script that the service runs to execute the apt-get commands. This script takes the following switches, which are passed to it by the service:
 -a automatically reboot if needed (does not reboot by default)
 -r when to reboot if needed (now, 3:00 (3am on 24 hr clock), 18:00 (6pm on 24 hr clock), +2h)
 -m do not run autoremove (runs by default)
 -c do not run clean (runs by default)
  • /lib/systemd/system/autoupdater.service
    This service file does not execute on it's own, but is instead executed by the timer file. You can modify this service file to change the options that are passed to the script. When this service is started, it runs /usr/bin/autoupdater with the specified switches and then exits on completion.

  • /lib/systemd/system/autoupdater.timer
    The timer file is responsible for starting the service on a schedule. There are two options you can change here. The values shown are the current defaults.

# Time to wait after booting before we run first time
OnBootSec=10min
# Time between running each consecutive time
OnUnitActiveSec=12h

If you make changes to any of these files, you will need to run this afterwards:

sudo systemctl daemon-reload

Installation

The simplest way to install is using the provided deb package:

sudo dpkg -i autoupdater.deb

To uninstall the service:

sudo dpkg -P autoupdater

Logging

Systemd logs to the built in journal by default, and all writes to stdout are visible in the journal.
To view the logs for this service:

journalctl -u autoupdater.service

You can also view the current state of the service by running:

systemctl autoupdater status

autoupdater's People

Contributors

jerblack avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.