Created
June 8, 2016 14:45
-
-
Save diversemix/19d18b603aeea3dc6f7ba23964b88c68 to your computer and use it in GitHub Desktop.
Installing a service from scripts.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -x | |
systemctl stop $1 | |
systemctl disable $1 | |
systemctl daemon-reload | |
systemctl reset-failed | |
systemctl status $1 && exit 1 | |
ls -l /etc/systemd/system/$1* | |
systemctl enable $PWD/$1.service | |
systemctl start $1 | |
systemctl status $1 | |
netstat -lpn | grep 22 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment