Skip to main content

Thread: Problem with /etc/rc.local


hi guys new here in fact first post here heres problem
trying make script saves time , date @ when computer restarts
heres have done far

#!/bin/bash

sudo touch /var/log/restart.txt

su root

sudo last reboot > /var/log/restart.txt/
saved restart.sh ,made sure executeable , /etc/rc.local file looks like
#!/bin/sh -e
#
# rc.local
#
# script executed @ end of each multiuser runlevel.
# make sure script "exit 0" on success or other
# value on error.
#
# in order enable or disable script change execution
# bits.
#
# default script nothing.

/home/pc/restart.sh

exit 0
now problem not overwriting restart.txt file new restart time , date

dont know please guys me 1

will script run manually? looks there mistake in last line.

line

sudo last reboot > /var/log/restart.txt/

should read

sudo last reboot > /var/log/restart.txt


Forum The Ubuntu Forum Community Ubuntu Official Flavours Support General Help [ubuntu] Problem with /etc/rc.local


Ubuntu

Comments

Popular posts from this blog

Could not place because the source rectangle is empty

Thread: Using smartcard reader with vpnc

Adobe Font Folio 7.0 or just 7?