0

In Ubuntu, I can install sysstat using apt, e.g.

apt-get install sysstat

And then enable it via interactive prompt

dpkg-reconfigure sysstat

But I want automate the process using fully automated shell script, what command I can use?

Howard
  • 2,135
  • 13
  • 48
  • 72

2 Answers2

1

Service may be configured via update-rc.d

Cron job uses settings from /etc/default/sysstat, string ENABLED="true"

Selivanov Pavel
  • 2,206
  • 3
  • 26
  • 48
1
apt-get install sysstat -y
echo 'ENABLED="true"' > /etc/default/sysstat
service sysstat restart

save as say: /root/enSAR.sh, make executable chmod +x /root/enSAR.sh, then run as root:

~# sh /root/enSAR.sh

Checked, if you are running Ubuntu, then that should work. Debian uses additional values in /etc/default/sysstat

Grizly
  • 2,063
  • 15
  • 21