Systemctl tor.service invalid - Tor does not restart on systemctl start tor command

Please refer to: https://askubuntu.com/questions/882527/tor-process-will-not-start-automatically-on-ubuntu-16-04/903341

When I looked at tor.service I find it's nothing more than a dummy file that only returns true if the tor.service is running and not the actual tor program itself:


This service is actually a systemd target,

but we are using a service since targets cannot be reloaded.

[Unit]

Description=Anonymizing overlay network for TCP (multi-instance-master)

[Service]

Type=oneshot

RemainAfterExit=yes

ExecStart=/bin/true

ExecReload=/bin/true


So regardless if the TOR process is actually running or not, tor.service always returns TRUE. This is Invalid. and As a result running: sudo systemctl start|stop tor does nothing as you can see here:

● tor.service - Anonymizing overlay network for TCP (multi-instance-master)

** Loaded: loaded (/lib/systemd/system/tor.service; enabled; vendor preset: enabled)**

Active: active (exited) since Sun 2017-12-10 14:24:42 EST; 9min ago

Main PID: 17641 (code=exited, status=0/SUCCESS)

CGroup: /system.slice/tor.service

So for the moment the temporary fix is:

Removing or renaming offending file /lib/systemd/system/tor.service and reloading the scripts w/ systemctl daemon-reload. because the actual and correct script to start tor is in /etc/init.d/tor

After this modifcation the resulting output of sudo systemctl status tor:

● tor.service - LSB: Starts The Onion Router daemon processes

** Loaded: loaded (/etc/init.d/tor; bad; vendor preset: enabled)**

Active: active (exited) since Sun 2017-12-10 14:24:42 EST; 26min ago

Docs: !man:systemd-sysv-generator(8)

Main PID: 17641 (code=exited, status=0/SUCCESS)

CGroup: /system.slice/tor.service

I believe the tor script in /etc/init.d/tor is incorrectly attempting to start/stop tor through tor.service as well.

Please correct this as soon as possible thank you !

Trac:
Username: d3m0nkingx