Skip to content

Instantly share code, notes, and snippets.

@mayurah
Created June 22, 2020 20:02
Show Gist options
  • Save mayurah/921ac23aaaf2f87952bea6b894fad6cc to your computer and use it in GitHub Desktop.
Save mayurah/921ac23aaaf2f87952bea6b894fad6cc to your computer and use it in GitHub Desktop.
uba_start_on_boot.as
# touch /etc/systemd/system/uba.service
# chmod 664 /etc/systemd/system/uba.service
# vim /etc/systemd/system/uba.service
[Unit]
Description=UBA-SERVER
[Service]
Type=simple
RemainAfterExit=yes
ExecStart=sudo su - caspida -c /opt/caspida/bin/Caspida start-all
ExecStop=sudo su - caspida -c /opt/caspida/bin/Caspida stop-all
ExecRestart=sudo su - caspida -c /opt/caspida/bin/Caspida stop-all;sleep 1;sudo su - caspida -c /opt/caspida/bin/Caspida start-all
Restart=always
KillMode=process
[Install]
WantedBy=multi-user.target
# sudo systemctl enable uba
# sudo systemctl status uba
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment