summaryrefslogtreecommitdiff
path: root/init.sh
diff options
context:
space:
mode:
authorAaron Ball <nullspoon@oper.io>2017-12-24 13:46:53 -0700
committerAaron Ball <nullspoon@oper.io>2017-12-24 13:46:53 -0700
commit66763dab98ae75c60661f656c5230cc6365f51a3 (patch)
tree2827d718529525159ff80f7e03aae528beeca252 /init.sh
parent0e3993c2a440ed4407ca210cf8b8bcc0487806e5 (diff)
downloadluminous-66763dab98ae75c60661f656c5230cc6365f51a3.tar.gz
luminous-66763dab98ae75c60661f656c5230cc6365f51a3.tar.xz
Initial commit of init script
This script just sets the permissions on the brightness file so it is writable by all users on the system. This allows users to run luminous without the need to be root. On start, this script sets brightness to 666. On stop, sets brightness file permissions to 644.
Diffstat (limited to 'init.sh')
-rwxr-xr-xinit.sh17
1 files changed, 17 insertions, 0 deletions
diff --git a/init.sh b/init.sh
new file mode 100755
index 0000000..6105698
--- /dev/null
+++ b/init.sh
@@ -0,0 +1,17 @@
+#!/bin/sh
+#
+# start/stop luminous setup
+#
+# This only sets the permissions on the brightness
+
+case $1 in
+ start)
+ chmod 666 /sys/class/backlight/*/brightness
+ ;;
+ stop)
+ chmod 644 /sys/class/backlight/*/brightness
+ ;;
+ *)
+ printf "usage: $0 [start|stop]\n"
+ ;;
+esac

Generated by cgit