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?

0

2 Answers 2

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

1

Service may be configured via update-rc.d

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

Not the answer you're looking for? Browse other questions tagged .