$ cd /tmp
$ git clone https://github.com/antirez/disque.git
$ cd disque/
$ make
$ make test
$ sudo make install
$ sudo useradd -M -r disque
$ mkdir /etc/disque/
$ cp disque.conf /etc/disque/
$ vi /etc/disque/disque.conf # configure daemonize, pidfile, bind
$ sudo curl -so /etc/systemd/system/disque.service https://gist.githubusercontent.com/borisguery/3c5aee0005cb53e1de849fa7847196c9/raw/791e85a3d634dfc396b0ec4b55e3a52a5152af97/disque.service
$ sudo systemctl daemon-reload # reload systemd
$ sudo service disque start # actually start the service
$ sudo service disque status # ensure everything is running well
Last active
July 4, 2017 09:43
-
-
Save borisguery/3c5aee0005cb53e1de849fa7847196c9 to your computer and use it in GitHub Desktop.
Disque install and systemd service configuration
This file contains hidden or 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
[Unit] | |
Description=Disque Distributed Message Broker | |
After=network.target | |
[Service] | |
Type=forking | |
PIDFile=/var/run/disque/disque.pid | |
User=disque | |
Group=disque | |
Environment=statedir=/var/run/disque/ | |
WorkingDirectory=/var/run/disque/ | |
PermissionsStartOnly=true | |
ExecStartPre=/bin/mkdir -p ${statedir} | |
ExecStartPre=/bin/mkdir -p /var/logs/disque | |
ExecStartPre=/bin/chown -R disque:disque ${statedir} /var/logs/disque | |
ExecStart=/usr/local/bin/disque-server /etc/disque/disque.conf | |
ExecReload=/bin/kill -USR2 $MAINPID | |
ExecStop=/usr/local/bin/disque shutdown | |
Restart=always | |
[Install] | |
WantedBy=multi-user.target |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment