Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Volodymyr Melnyk
snmp_stats
Commits
d240faa8
Commit
d240faa8
authored
Nov 26, 2018
by
Volodymyr Melnyk
Browse files
Licking oneselve's balls
parent
c071b387
Changes
2
Hide whitespace changes
Inline
Side-by-side
bin/snmp_io_stats.sh
View file @
d240faa8
...
...
@@ -10,7 +10,7 @@ mib="${_mib_root}.10"
act
=
"
${
1
}
"
req
=
"
${
2
}
"
_log_file
=
"
${
_log_dir
}
/snmp_stats.log"
_log_file
=
"
${
_log_dir
}
/snmp_
io_
stats.log"
_log 1
"
${
act
}
${
req
}
requested"
...
...
sbin/install.sh
View file @
d240faa8
...
...
@@ -12,28 +12,28 @@ fi
systemd_service_config
=
'/etc/systemd/system/save_io_stats.service'
if
[[
!
-f
"
${
systemd_service_config
}
"
]]
;
then
_log
1
"Installing systemd service configuration file"
_log
0
"Installing systemd service configuration file"
cat
"
${
_share_dir
}
/systemd/save_io_stats.service"
>
"
${
systemd_service_config
}
"
fi
sudoers_config
=
'/etc/sudoers.d/save_io_stats'
if
[[
!
-f
"
${
sudoers_config
}
"
]]
;
then
_log
1
"Installing sudoers configuration snippet"
_log
0
"Installing sudoers configuration snippet"
cat
"
${
_share_dir
}
/sudoers/save_io_stats"
>
"
${
sudoers_config
}
"
fi
logrotate_config
=
'/etc/logrotate.d/snmp_stats'
if
[[
!
-f
"
${
logrotate_config
}
"
]]
;
then
_log
1
"Installing logrotate configuration snippet"
_log
0
"Installing logrotate configuration snippet"
cat
"
${
_share_dir
}
/logrotate/snmp_stats"
>
"
${
logrotate_config
}
"
fi
io_stats_spool
=
"
${
_spool_dir
}
/io"
if
[[
!
-f
"
${
io_stats_spool
}
"
]]
;
then
_log
1
"Creating the spool directory"
_log
0
"Creating the spool directory"
mkdir
-p
"
${
io_stats_spool
}
"
chown
root:nobody
"
${
io_stats_spool
}
"
chmod
0770
"
${
io_stats_spool
}
"
fi
_log
1
"Installation steps have been completed"
_log
0
"Installation steps have been completed"
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment