Closed jlin-nf closed 1 year ago
Looks like we need to relocate from /etc/systemd/system
to /usr/lib/systemd/system
per: https://www.freedesktop.org/software/systemd/man/systemd.unit.html#Unit%20File%20Load%20Path
It seems systemctl disable
clobbers symlinks installed to /etc/systemd/system
. I will make a test.
The installation put a sym link to the service file (resides under /opt/openziti/share). Once the service is enabled and disable. the sym link is removed. After that, enable service result in an error. Here is what it looks like after service is enabled: ziggy@james-azure-er-sg:/etc/systemd/system$ ls -l |grep ziti-edge lrwxrwxrwx 1 root root 44 Feb 22 02:02 ziti-edge-tunnel.service -> /opt/openziti/share/ziti-edge-tunnel.service ziggy@james-azure-er-sg:/etc/systemd/system$ ls -l multi-user.target.wants/ |grep ziti-edge lrwxrwxrwx 1 root root 44 Feb 22 02:02 ziti-edge-tunnel.service -> /opt/openziti/share/ziti-edge-tunnel.service
Here is what it looks like after service is disabled: ziggy@james-azure-er-sg:/etc/systemd/system$ sudo systemctl disable ziti-edge-tunnel Removed /etc/systemd/system/ziti-edge-tunnel.service. Removed /etc/systemd/system/multi-user.target.wants/ziti-edge-tunnel.service. ziggy@james-azure-er-sg:/etc/systemd/system$ ls -l |grep ziti-edge ziggy@james-azure-er-sg:/etc/systemd/system$ ls -l multi-user.target.wants/ |grep ziti-edge
ziggy@james-azure-er-sg:/etc/systemd/system$ sudo systemctl enable ziti-edge-tunnel Failed to enable unit: Unit file ziti-edge-tunnel.service does not exist.