How to configure NetOps Spectrum non-root installation to have sradmin, processd and SDC services automatically start after system reboot.
These changes also apply in a similar way to the sdmconnector.service and the processd.service. All of them are located in the user's .config home directory for systemd.
A sample output will be listed in Additional Information below:
1) edit sradmin.service and do the modifications as below:
~~~
[Unit]
Modify this line as below "SourcePath=/sw/SPECTRUM/SRAdmin/sradmin.sh"
SourcePath=/sw/SPECTRUM/SRAdmin
Add and update the below content under [Service] section in the same file,
[Service]
TimeoutSec=0
ExecStart=/bin/bash -c "/sw/SPECTRUM/SRAdmin/sradmin.sh start"
ExecStop=/bin/bash -c "/sw/SPECTRUM/SRAdmin/sradmin.sh stop"
Restart=always
RestartSec=60
Change the WantedBy field also as below,
[Install]
WantedBy=default.target
2) Re-enable the sradmin.service as below,
$ systemctl --user disable sradmin.service
$ systemctl --user daemon-reload
$ systemctl --user enable sradmin.service
3) Check if you are able stop and start the service manually.
4) Then reboot the system and verify that after reboot the service is up and running.
Install or Upgrade on Linux with Non-root User
The fix can be tracked as User Story US909523:Spectrum non-root install services not restarting after system reboot
Sample Output
[root@####### sdmconnector.service.d]# ls -al
total 8
drwxr-xr-x. 2 root root 31 Oct 6 2020 .
drwxr-xr-x. 15 root root 4096 Aug 7 01:30 ..
-rw-r--r--. 1 root root 39 Oct 6 2020 sdmconnector.conf
[root@####### sdmconnector.service.d]# cat sdmconnector.conf
[Service]
User=spectrum
Group=spectrum
[root@####### sdmconnector.service.d]# pwd
/etc/systemd/system/sdmconnector.service.d
[root@####### sdmconnector.service.d]# cd /home/spectrum/.config/systemd/user/
[root@####### user]# ls -la
total 12
drwxrwxr-x. 3 spectrum spectrum 138 Aug 22 12:33 .
drwxrwxr-x. 3 spectrum spectrum 18 Feb 25 2021 ..
drwxr-xr-x. 2 spectrum spectrum 34 Aug 22 11:14 default.target.wants
-rw-rw-r--. 1 spectrum spectrum 641 Aug 22 11:14 sdmconnector.service
[root@####### user]# cat sdmconnector.service
[Unit]
SourcePath=/local/SDMConnector/bin/sdmconnector.sh
Description=LSB: SPECTRUM Secure Domain Manager Daemon
Before=runlevel3.target
Before=runlevel5.target
Before=shutdown.target
After=network-online.target
Wants=network-online.target
Conflicts=shutdown.target
[Service]
Type=forking
Restart=always
RestartSec=60
TimeoutSec=0
IgnoreSIGPIPE=no
KillMode=process
GuessMainPID=no
RemainAfterExit=yes
ExecStart=/bin/bash -c "/local/SDMConnector/bin/sdmconnector.sh start; systemctl --user daemon-reload"
ExecStop=/bin/bash -c "/local/SDMConnector/bin/sdmconnector.sh stop; systemctl --user daemon-reload"
[Install]
WantedBy=default.target
[root@####### user]#