Work on standalone mode
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
# openkiosk
|
||||
|
||||
if [[ "$EUID" == "0" || $(who|cut -d" " -f1) == "kioskuser" ]]
|
||||
if [[ "$EUID" == "0" || $(whoami) == "kioskuser" ]]
|
||||
then
|
||||
conf_file="/etc/openkiosk/openkiosk.conf"
|
||||
run_type="standalone"
|
||||
@@ -111,17 +111,12 @@ function check_url() {
|
||||
function debuglog() {
|
||||
if [[ "$DEBUG" == "1" ]]
|
||||
then
|
||||
if [[ "$run_type" == "standalone" ]]
|
||||
logfile="$HOME/openkiosk.log"
|
||||
if [[ ! -e "$logfile" ]]
|
||||
then
|
||||
logfile_path="/var/log/openkiosk.log"
|
||||
else
|
||||
logfile_path="$HOME/openkiosk.log"
|
||||
echo "openkiosk log started : "$(date +%Y-%m-%d %H:%M:%S) > $logfile
|
||||
fi
|
||||
if [[ ! -e "$logfile_path" ]]
|
||||
then
|
||||
echo "openkiosk log started : "$(date +%Y-%m-%d %H:%M:%S) > $logfile_path
|
||||
fi
|
||||
echo $(date +%H:%M:%S) "$1">>$logfile_path
|
||||
echo $(date +%H:%M:%S) "$1">>$logfile
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user