From 58b72fac0003c4522abf1ab435a380eb99e4eb6e Mon Sep 17 00:00:00 2001 From: Dobrica Pavlinusic Date: Sat, 2 Mar 2019 08:49:23 +0100 Subject: [PATCH] run through sudo, fix snmp mib enable --- debian-install.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/debian-install.sh b/debian-install.sh index c9e0254..02af039 100755 --- a/debian-install.sh +++ b/debian-install.sh @@ -1,4 +1,8 @@ -sudo apt-get install cups printer-driver-fujixerox cups-ipp-utils printer-driver-cups-pdf snmp snmp-mibs-downloader +#!/bin/sh + +test `id -u` -ne 0 && exec sudo $0 + +apt-get install cups printer-driver-fujixerox cups-ipp-utils printer-driver-cups-pdf snmp snmp-mibs-downloader # enable mibs -grep -i '^mibs :' /etc/snmp/snmp.conf && perl -p -i -n -e 's/^mibs : .*/mibs +ALL/' /etc/snmp/snmp.conf +grep -i '^mibs :' /etc/snmp/snmp.conf && perl -p -i -n -e 's/^mibs :.*/mibs +ALL/' /etc/snmp/snmp.conf -- 2.20.1