Autostart disable of tor.service

Creating a bug report/issue

Required Information

  • DietPi version | 8.6.1
  • Distro version | bullseye 0
  • Kernel version | Linux DietPi 5.15.32-v7+ #1538 SMP Thu Mar 31 19:38:48 BST 2022 armv7l GNU/Linux
  • SBC model | RPi 2 Model B (armv7l)
  • Power supply used | (EG: 5V 1A RAVpower)
  • SD card used | (EG: SanDisk ultra)

Additional Information (if applicable)

  • Software title | (TOR relay)

Steps to reproduce

  1. …Install TOR relay from dietpi-software
  2. …Try to disable TOR with “sudo systemctl disable tor.service and sudo systemctl disable tor@default.service”
  3. …Reboot and see that TOR starts
  4. …Make all steps of startup - How to prevent Tor from starting automatically on Ubuntu server? - Ask Ubuntu
  5. …TOR starts after reboot again.

I don’t know much about linux, so i’m missing something or doing wrong? (Unbound or Pihole let me disabling it problemless with “sudo systemctl disable unbound/pihole”)

Expected behaviour

  • …TOR relay should not autostart

Actual behaviour

  • …It starts

Extra details

Welcome to our community.

This is an exspected behaviour as DietPi has taken control on the service. You would need to disable DietPi control, to be able to manage the service manually. You can do this using dietpi-services. Select your service and set it to [Systemd controlled] + [excluded], like this

                         ●─ Service Control ──────────────────────────────● 
 State                   : [active]                                         
 Mode                    : [Systemd controlled]                             
 Include/Exclude         : [excluded]                                       
 Status                  : Display systemd status log

Wow, that is so simple (after you know where to look).
Thank you!

You can leave it at DietPi controlled btw, so systemd doesn’t start it either:

  • systemd controlled equals systemctl enable, so that systemd is effectively starting it at boot.
  • DietPi controlled equals systemctl disable so that DietPi is effectively starting it at boot, at a later stage in defined order.
  • Excluded tells DietPi to not start it either.
1 Like