Here is my start/stop script for systemd using tmux:
[Unit]
Description=nZEDb Main
After=mysql.service
Requires=mysql.service network.target
[Service]
Type=forking
User=nzedb
group=www-data
# ensure that when nZEDb looks for tmux it finds /usr/local/bin version first
Environment='PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin'
ExecStart=/usr/bin/php /websites/nZEDb16/misc/update/nix/tmux/start.php
# default name for a tmux session is 0 then 1 ...
ExecStop=/usr/local/bin/tmux kill-session -t nZEDb16
WorkingDirectory=/websites/nZEDb16
[Install]
WantedBy=multi-user.target
First I set the environment to /usr/local/bin first so I pick up custom binaries as opposed to those installed by Ubuntu (such as tmux 1.9a). Second I want mysql and networking running before I start nZEDb. Basically it is similar to those for screen, but the kill commaond is customized for tmux. Note "nZEDb16" is the name of the session from the tmux properties, if need to change this to the name you set there.
Note: Tested and functional on Ubuntu 16.04.
ERIC