Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- cat > "/etc/systemd/system/${1}.service" << EOF
- [Unit]
- Description=$2
- After=network-online.target
- [Service]
- Type=simple
- User=%i
- ExecStart=$3
- [Install]
- WantedBy=multi-user.target
- EOF
- systemctl --system daemon-reload
- systemctl enable $1
- systemctl start $1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement