Commit 61b1909780db81d42a3acc00c3891b85f4b16290
1 parent
10aa67f6
Exists in
master
and in
35 other branches
Bump noosfero release
Add systemd unit to the package Signed-off-by: Athos Ribeiro <athoscribeiro@gmail.com> Signed-off-by: Lucas Kanashiro <athoscribeiro@gmail.com>
Showing
1 changed file
with
18 additions
and
4 deletions
Show diff stats
src/pkg-rpm/noosfero/noosfero.spec
| ... | ... | @@ -3,7 +3,7 @@ |
| 3 | 3 | |
| 4 | 4 | Name: noosfero |
| 5 | 5 | Version: 1.3.6+spb3 |
| 6 | -Release: 1 | |
| 6 | +Release: 2 | |
| 7 | 7 | Summary: Social Networking Platform |
| 8 | 8 | Group: Applications/Publishing |
| 9 | 9 | License: AGPLv3 |
| ... | ... | @@ -44,8 +44,22 @@ rm -rf %{buildroot}/usr/lib/noosfero/debian |
| 44 | 44 | rm -rf %{buildroot}/usr/lib/noosfero/config/plugins |
| 45 | 45 | |
| 46 | 46 | # install config files |
| 47 | -mkdir -p %{buildroot}/etc/init.d | |
| 48 | -cp etc/init.d/noosfero %{buildroot}/etc/init.d/ | |
| 47 | +mkdir -p %{buildroot}/etc/systemd/system | |
| 48 | +cat > %{buildroot}/etc/systemd/system/noosfero.service <<EOF | |
| 49 | +[Unit] | |
| 50 | +Description=Noosfero service | |
| 51 | + | |
| 52 | +[Service] | |
| 53 | +Type=forking | |
| 54 | +User=noosfero | |
| 55 | +WorkingDirectory=/usr/lib/noosfero | |
| 56 | +ExecStart=/usr/lib/noosfero/script/production start | |
| 57 | +ExecStop=/usr/lib/noosfero/script/production stop | |
| 58 | +TimeoutSec=300 | |
| 59 | + | |
| 60 | +[Install] | |
| 61 | +WantedBy=multi-user.target | |
| 62 | +EOF | |
| 49 | 63 | |
| 50 | 64 | mkdir -p %{buildroot}/etc/noosfero/plugins |
| 51 | 65 | ln -sf /etc/noosfero/database.yml %{buildroot}/usr/lib/noosfero/config/database.yml |
| ... | ... | @@ -144,7 +158,7 @@ chkconfig --del noosfero |
| 144 | 158 | |
| 145 | 159 | %files |
| 146 | 160 | /usr/lib/noosfero |
| 147 | -/etc/init.d/noosfero | |
| 161 | +/etc/systemd/system/noosfero.service | |
| 148 | 162 | /etc/noosfero/plugins/README |
| 149 | 163 | %config(noreplace) /etc/default/noosfero |
| 150 | 164 | %config(noreplace) /etc/noosfero/database.yml | ... | ... |