riskiwah / systemd-playground

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

systemd-rollback

A place where going to POC-ing dynamic variable at systemd stuffs

Demo time

  1. Place unit file (rollback@rollback.service) to /etc/systemd/system
  2. Move dyanmic variable file rollback@rollback-dynamic at /opt/systemd-rollback/
  3. Enable it
    $ sudo systemctl enable --now rollback@rollback-dynamic
  4. Restart service
    $ sudo systemctl daemon-reload
    
    ## OR
    
    $ sudo systemctl restart rollback@rollback-dynamic.servic
  5. Enjoy 😀

Some notes

while trigger the change, we can watch or follow the log changes with journalctl -u rollback@rollback-dynamic.service -f

Some Great write up/sources

About


Languages

Language:Shell 74.8%Language:Go 25.2%