Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Please note:  There is no need to install a new instance of DualShield on the new machine, as this process will do this automatically!

On the existing machine

  • Stop services

...

Code Block
languagebash
sudo tar -C /opt -czf dualshield.tar.gz dualshield
  • At this stage, it is strongly recommended you check where the service scripts are located
  • Run the following command
Code Block
languagebash
systemctl list-unit-files | grep -i dual
  • If you see results of...

Image Added

..then it is most certainly systemd

  • Therefore you can copy systemd service scripts as followsCopy service scripts
Code Block
languagebash
cp /usr/lib/systemd/system/dualshield.service .
cp /usr/lib/systemd/system/dualsql.service .
  • If however you had blank results then please try
Code Block
languagebash
ls /etc/init.d/ | grep -i dual 
  • If you see results of...

Image Added

..then it is most certainly SysV

  • Therefore you need to copy the SysV service scripts as follows
Code Block
languagebash
cp /etc/init.d/dualshield
cp /etc/init.d/dualsql
  • Copy all files to the new machine
Code Block
languagebash
scp -r /path/to/dualshield-files someuser@remote.server:/somepath/

...

Code Block
languagebash
sudo tar -xzvf dualshield.tar.gz -C /opt/
  • If Systemd (see above) Copy the following Service service script
Code Block
languagebash
sudo cp dualshield.service /usr/lib/systemd/system/
sudo cp dualsql.service /usr/lib/systemd/system/
  • Register services
Code Block
languagebash
sudo systemctl enable dualshield.service
sudo systemctl enable dualsql.service
  • If SysV (see above) Copy the following service script
Code Block
languagebash
cp dualshield /etc/init.d
cp dualsql /etc/init.d
  • You will need to also register the SysV services
Code Block
languagebash
update-rc.d dualsql defaults 88
update-rc.d dualshield defaults 89
  • Create dualshield user
Code Block
languagebash
sudo useradd -g dualshield -s /sbin/nologin dualshield

...

Code Block
languagebash
sudo echo "127.0.0.1    dualshield.fqdn.com" >> /etc/hosts
sudo echo "127.0.0.1    $(hostname)" >> /etc/hosts

...

  • Start services if systemd
Code Block
languagebash
sudo systemctl enablestart dualshield.servicedualsql
sudo systemctl enablestart dualsql.servicedualshield
  • Start services if SysV
Code Block
languagebash
sudo systemctl/etc/init.d/dualsql start dualsql
sudo systemctl/etc/init.d/dualshield start dualshield