systemctl

Usage

configure service

1
2
3
4
5
6
7
8
9
10
# /etc/systemd/system/test.service

[Unit]
Description=Spark service

[Service]
ExecStart=/path/to/spark/sbin/start-all.sh

[Install]
WantedBy=multi-user.target
1
2
3
4
5
6
7
8
9
10
cat >> /etc/systemd/system/mosh-server.service <<EOF
[Unit]
Description=Mosh Service

[Service]
ExecStart=/usr/bin/mosh-server

[Install]
WantedBy=multi-user.target
EOF

boot service

1
2
sudo systemctl enable mosh-server
sudo systemctl start mosh-server