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,005
  • 11
  • 47
  • 70

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,126
  • 3
  • 23
  • 47
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,053
  • 15
  • 20