Commit 6c521c90 authored by Valery Kartel's avatar Valery Kartel Committed by Leonardo Arena
Browse files

main/cacti: add crontab, several fixes

- add crontab job
- fixes in cacti-setup post-install info
- fix pre-install user creation
- do not include user to www-data group
parent 4e089bf7
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
# Maintainer: Jeff Bilyk <jbilyk@gmail.com> # Maintainer: Jeff Bilyk <jbilyk@gmail.com>
pkgname=cacti pkgname=cacti
pkgver=1.0.0 pkgver=1.0.0
pkgrel=0 pkgrel=1
pkgdesc="The complete rrdtool-based graphing solution" pkgdesc="The complete rrdtool-based graphing solution"
url="http://www.cacti.net" url="http://www.cacti.net"
arch="noarch" arch="noarch"
...@@ -16,6 +16,7 @@ subpackages="$pkgname-doc $pkgname-lang $pkgname-setup \ ...@@ -16,6 +16,7 @@ subpackages="$pkgname-doc $pkgname-lang $pkgname-setup \
" "
install="$pkgname.pre-install $pkgname-setup.post-install" install="$pkgname.pre-install $pkgname-setup.post-install"
source="http://www.cacti.net/downloads/$pkgname-$pkgver.tar.gz source="http://www.cacti.net/downloads/$pkgname-$pkgver.tar.gz
$pkgname.crontab
$pkgname.nginx.conf $pkgname.nginx.conf
$pkgname.php-fpm.conf $pkgname.php-fpm.conf
" "
...@@ -30,6 +31,7 @@ package() { ...@@ -30,6 +31,7 @@ package() {
"$pkgdir"/var/log "$pkgdir"/var/log
cp -r * "$pkgdir"/usr/share/webapps/$pkgname/ || return 1 cp -r * "$pkgdir"/usr/share/webapps/$pkgname/ || return 1
install -Dm600 "$srcdir"/$pkgname.crontab "$pkgdir"/etc/crontabs/$pkgname
# remove development data # remove development data
rm -fr "$pkgdir"/usr/share/webapps/$pkgname/locales/po \ rm -fr "$pkgdir"/usr/share/webapps/$pkgname/locales/po \
...@@ -130,11 +132,14 @@ _php() { ...@@ -130,11 +132,14 @@ _php() {
} }
md5sums="e711a305a12484623669e3c873126348 cacti-1.0.0.tar.gz md5sums="e711a305a12484623669e3c873126348 cacti-1.0.0.tar.gz
213c3aff8cf08438703ae5e544046eae cacti.crontab
8f28596ea23b68b0041680112ebab685 cacti.nginx.conf 8f28596ea23b68b0041680112ebab685 cacti.nginx.conf
b06ea26524a5fb30cfd083cfa0f235a8 cacti.php-fpm.conf" b06ea26524a5fb30cfd083cfa0f235a8 cacti.php-fpm.conf"
sha256sums="180a23102af0415b961ef4d4181f93f49d40ebed36c5392ac988650d3753e693 cacti-1.0.0.tar.gz sha256sums="180a23102af0415b961ef4d4181f93f49d40ebed36c5392ac988650d3753e693 cacti-1.0.0.tar.gz
9cfa7edec4b28722230b7b509cc420958b7864703752bb70c8376282bfc1c5a9 cacti.crontab
35bb157b53a11edcb923b91decac7e6468ede9376a109d73037d747165cc38e3 cacti.nginx.conf 35bb157b53a11edcb923b91decac7e6468ede9376a109d73037d747165cc38e3 cacti.nginx.conf
f8a5697a4fd8c279d29d383c90b51f0c73311d3ac96d14953ec11f2f7d5bbdb2 cacti.php-fpm.conf" f8a5697a4fd8c279d29d383c90b51f0c73311d3ac96d14953ec11f2f7d5bbdb2 cacti.php-fpm.conf"
sha512sums="9133bb3d34ee6a4fe94e8258ce76df1ceac5cc76ccc8a492ae9a1263cbfb765f88f169c2780f2b36c14d8df4607e8effaf448bcb632cd4171533d0f9842550b1 cacti-1.0.0.tar.gz sha512sums="9133bb3d34ee6a4fe94e8258ce76df1ceac5cc76ccc8a492ae9a1263cbfb765f88f169c2780f2b36c14d8df4607e8effaf448bcb632cd4171533d0f9842550b1 cacti-1.0.0.tar.gz
70f47dbbca76489fc3a84452ee8065f9571ee627b3e346cd3c866501d723a609372c4fbd7e53c4bdcdb22439d876d78847f8902dfa43f3f66b2329639e795ab9 cacti.crontab
9b3fe765c6196c0e4988efaa7236d8a8b945725548371b4a0e2a371de374c9577a908d58dcef5a4e59e089ca923cfeb7c5ddea9ee983a5115239052cf9b8ab59 cacti.nginx.conf 9b3fe765c6196c0e4988efaa7236d8a8b945725548371b4a0e2a371de374c9577a908d58dcef5a4e59e089ca923cfeb7c5ddea9ee983a5115239052cf9b8ab59 cacti.nginx.conf
695a5e8439ef0ed29068c87b1d711f66c5a24cf31c3c213784f83d6aef8608a07e99bfa2343a6487762572b6022926c3846f704494c7806e9a1aa2c49e18513b cacti.php-fpm.conf" 695a5e8439ef0ed29068c87b1d711f66c5a24cf31c3c213784f83d6aef8608a07e99bfa2343a6487762572b6022926c3846f704494c7806e9a1aa2c49e18513b cacti.php-fpm.conf"
...@@ -2,19 +2,20 @@ ...@@ -2,19 +2,20 @@
cat <<EOF cat <<EOF
* Inital setup: * Inital setup:
* 1. configure webserver's site root to /usr/share/webapps/cacti * 1. create mysql user and database (read manual)
* 2. create mysql user and database * 2. change settings in /etc/cacti/config.php
* 3. change settings in /etc/cacti/config.php * 3. configure webserver's site root to /usr/share/webapps/cacti
* 4. go online (http://$(hostname -f)/cacti/install) to continue setup
* 5. enjoy :)
* *
* Go online to continue setup * After setup complete, you can safely remove cacti-setup
*
* After setup complete, you can safely remove cacti-setup aport
* *
* Partial config for nginx: * Partial config for nginx:
* /usr/share/webapps/cacti/docs/txt/nginx.conf * /usr/share/webapps/cacti/docs/txt/nginx.conf
* *
* Installation instructions and manual: * Installation instructions and manual:
* /usr/share/webapps/cacti/docs/txt/manual.txt * /usr/share/webapps/cacti/docs/txt/manual.txt
*
EOF EOF
exit 0 exit 0
*/5 * * * * php /usr/share/webapps/cacti/poller.php >/dev/null 2>&1
#!/bin/sh #!/bin/sh
addgroup -S cacti 2>/dev/null
addgroup -Sg 82 www-data 2>/dev/null addgroup -Sg 82 www-data 2>/dev/null
adduser -SDh /var/lib/cacti -s /sbin/nologin -G cacti -g cacti cacti 2>/dev/null addgroup -S cacti 2>/dev/null
adduser cacti www-data 2>/dev/null adduser -S -D -H -h /var/lib/cacti -s /sbin/nologin -G cacti -g cacti cacti 2>/dev/null
exit 0 exit 0
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment