Skip to content

Instantly share code, notes, and snippets.

@int128
Created September 26, 2014 06:36
Show Gist options
  • Save int128/fbdccb7bee7775f5b0e0 to your computer and use it in GitHub Desktop.
Save int128/fbdccb7bee7775f5b0e0 to your computer and use it in GitHub Desktop.
Enable stone repeater on systemd

Enable stone repeater on systemd

Prerequisite:

  • CentOS 7
  • Development Tools
    • yum groupinstall 'Development tools'

Install stone

Get from http://www.gcd.org/sengoku/stone/Welcome.html and built it.

curl -O http://www.gcd.org/sengoku/stone/stone-2.3e.tar.gz
tzr zxvf stone-2.3e.tar.gz
cd stone-2.3d-2.3.2.7
make linux
sudo cp stone /usr/local/bin/stone

If error occurs, add -D_GNU_SOURCE to compiler options.

Register a service

Create /etc/systemd/system/stone.service and register it.

% sudo systemctl start stone.service

% sudo systemctl status stone.service
stone.service - Stone Repeater
   Loaded: loaded (/etc/systemd/system/stone.service; enabled)
   Active: active (running) since Fri 2014-09-26 15:23:37 JST; 3min 48s ago
 Main PID: 20910 (stone)
   CGroup: /system.slice/stone.service
           `-20910 /usr/local/bin/stone -l 127.0.0.1:9090 172.17.42.1:9090

Sep 26 15:23:37 host systemd[1]: Started Stone Repeater.
Sep 26 15:23:37 host stone[20910]: 140258104407872 start (2.3e) [20910]
Sep 26 15:23:37 host stone[20910]: 140258104407872 stone 3: 127.0.0.1:websm <-...
Hint: Some lines were ellipsized, use -l to show in full.

% sudo systemctl enable stone.service
[Unit]
Description=Stone Repeater
After=docker.service
[Service]
ExecStart=/usr/local/bin/stone -l 127.0.0.1:9090 172.17.42.1:9090
[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment