Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save danigunawan/2359ed4c82e6850ec71aec7c896c8a7f to your computer and use it in GitHub Desktop.
Save danigunawan/2359ed4c82e6850ec71aec7c896c8a7f to your computer and use it in GitHub Desktop.
Bash script for installing systemd service on Ubuntu
#! /bin/sh
# Other deployment actions here. Want to install (or bounce) service last.
if [ -f /etc/systemd/system/arcadely.service ]; then
sudo systemctl stop arcadely.service
sudo systemctl disable arcadely.service
else
sudo \cp -f ./arcadely.service /etc/systemd/system/arcadely.service
fi
sudo systemctl enable arcadely.service
sudo systemctl start arcadely.service
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment