File tree 4 files changed +49
-3
lines changed
4 files changed +49
-3
lines changed Original file line number Diff line number Diff line change @@ -13,8 +13,36 @@ on other distributions.
13
13
14
14
sudo apt install php-cli php-xml php-curl
15
15
16
- Make configuration file
16
+ Make configuration file:
17
17
18
- cp config.json.example config.json
18
+ cp example/ config.json config.json
19
19
20
- And edit it to match your setup
20
+ And edit it to match your setup.
21
+
22
+ Then run manually for the first time:
23
+
24
+ ./bot
25
+
26
+ ## Systemd timer
27
+
28
+ To get it running periodically, we use systemd. See example
29
+ configurations in [ example/] ( example/ ) subdirectory.
30
+
31
+ Copy example files to systemd:
32
+
33
+ ``` sh
34
+ sudo cp example/redmine-irc.* /etc/systemd/system
35
+ sudo chown root:root /etc/systemd/system/redmine-irc.*
36
+ ```
37
+
38
+ Edit ` /etc/systemd/system/redmine-irc.service ` to match with your
39
+ installation directory, user name, and group. Then run:
40
+
41
+ ``` sh
42
+ sudo systemctl daemon-reload
43
+ sudo systemctl enable redmine-irc.timer
44
+ sudo systemctl start redmine-irc.timer
45
+ ```
46
+
47
+ That shoud keep it running for every 5 minutes. To change the running
48
+ interval, edit ` /etc/systemd/system/redmine-irc.timer ` .
File renamed without changes.
Original file line number Diff line number Diff line change
1
+ [Unit]
2
+ Description =Prasos Redmine to IRC bot
3
+ After =network-online.target
4
+
5
+ [Service]
6
+ Type =oneshot
7
+ User =YOUR_USER
8
+ Group =YOUR_GROUP
9
+ ExecStart =/YOUR/PATH/bot
Original file line number Diff line number Diff line change
1
+ [Unit]
2
+ Description=Run Redmine to IRC bot periodically
3
+
4
+ [Timer]
5
+ OnCalendar=*:0/5
6
+ Persistent=true
7
+
8
+ [Install]
9
+ WantedBy=timers.target
You can’t perform that action at this time.
0 commit comments