klabo on Nostr: ChatGPT is so cool: how do i set up multiple services that start up in a tmux session ...
ChatGPT is so cool:
how do i set up multiple services that start up in a tmux session from systemd on ubuntu
1. Create a systemd service unit file for each service that you want to start up in a tmux session.
2. Add the following to each service unit file:
[Service]
ExecStart=/usr/bin/tmux new-session -d -s <session_name> <command>
Replace <session_name> with the name of the tmux session and <command> with the command to start the service.
3. Start the services with the following command:
sudo systemctl start <service_name>
Replace <service_name> with the name of the service.
4. Enable the services to start automatically on boot with the following command:
sudo systemctl enable <service_name>
Replace <service_name> with the name of the service.
how do i set up multiple services that start up in a tmux session from systemd on ubuntu
1. Create a systemd service unit file for each service that you want to start up in a tmux session.
2. Add the following to each service unit file:
[Service]
ExecStart=/usr/bin/tmux new-session -d -s <session_name> <command>
Replace <session_name> with the name of the tmux session and <command> with the command to start the service.
3. Start the services with the following command:
sudo systemctl start <service_name>
Replace <service_name> with the name of the service.
4. Enable the services to start automatically on boot with the following command:
sudo systemctl enable <service_name>
Replace <service_name> with the name of the service.