Skip to content

Instantly share code, notes, and snippets.

@kevinejohn
Last active September 3, 2015 09:19
Show Gist options
  • Save kevinejohn/52b7e2128efe8d0a6c2c to your computer and use it in GitHub Desktop.
Save kevinejohn/52b7e2128efe8d0a6c2c to your computer and use it in GitHub Desktop.
Copy unit files to remote VPS
#!/bin/bash
WEB_IP=$1
rsync --archive --progress --compress ./*.service core@$WEB_IP:/home/core/
ssh core@$WEB_IP sudo cp /home/core/*.service /etc/systemd/system/
ssh core@$WEB_IP sudo systemctl daemon-reload
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment