summarylogtreecommitdiffstats
path: root/setup.sh.patch
diff options
context:
space:
mode:
authorGeorg Pichler2016-11-15 21:37:43 +0100
committerGeorg Pichler2016-11-15 21:37:43 +0100
commite88f2f460d95378d395b8328e63d145fe748150d (patch)
tree4cc66dc349c389192428737dd4ea24aa733b79d9 /setup.sh.patch
parent63a00e756ef17f4304e1c6a12c975ae7ccff067c (diff)
downloadaur-e88f2f460d95378d395b8328e63d145fe748150d.tar.gz
Moved to 1.2.8
Diffstat (limited to 'setup.sh.patch')
-rw-r--r--setup.sh.patch50
1 files changed, 50 insertions, 0 deletions
diff --git a/setup.sh.patch b/setup.sh.patch
new file mode 100644
index 00000000000..33402b1eb10
--- /dev/null
+++ b/setup.sh.patch
@@ -0,0 +1,50 @@
+--- setup.sh.orig 2016-10-20 22:39:33.000000000 +0200
++++ setup.sh 2016-11-15 01:30:10.986666666 +0100
+@@ -738,33 +738,10 @@
+
+ create_sudo_configuration ()
+ {
+- # sudo only possible if running as root
+- if [ $UID != 0 ] ; then
+- return
+- fi
+-
++ mkdir -p $DESTDIR/etc/sudoers.d
+ sudolines="Defaults:$wwwuser !requiretty\n$wwwuser ALL = (root) NOPASSWD: $bindir/check_mk --automation *"
+-
+- if [ ! -e /etc/sudoers ] ; then
+- echo "You do not have sudo installed. Please install sudo "
+- echo "and add the following line to /etc/sudoers if you want"
+- echo "to use WATO - the Check_MK Web Administration Tool"
+- echo
+- echo -e "$sudolines"
+- echo
+- echo
+- return
+- fi
+-
+- if fgrep -q 'check_mk --automation' /etc/sudoers 2>/dev/null
+- then
+- # already present. Do not touch.
+- return
+- fi
+-
+- echo >> /etc/sudoers
+- echo "# Needed for WATO - the Check_MK Web Administration Tool" >> /etc/sudoers
+- echo -e "$sudolines" >> /etc/sudoers
++ echo "# Needed for WATO - the Check_MK Web Administration Tool" > $DESTDIR/etc/sudoers.d/check_mk
++ echo -e "$sudolines" >> $DESTDIR/etc/sudoers.d/check_mk
+ }
+
+ while true
+@@ -1049,8 +1026,9 @@
+ # WATO. Also create an empty and Apache-writable auth.serials
+ serials_file=$DESTDIR${htpasswd_file%/*}/auth.serials &&
+ touch "$serials_file" &&
++ touch "$DESTDIR${htpasswd_file}" &&
+ (chown $wwwuser "$serials_file" || true) &&
+- (chown $wwwuser "$htpasswd_file" || true) &&
++ (chown $wwwuser "$DESTDIR$htpasswd_file" || true) &&
+ create_sudo_configuration &&
+ if [ "$enable_mkeventd" = yes ]
+ then