added rc.local tailored to Cerbo with Biwatt batteries
This commit is contained in:
parent
97d88e700b
commit
aa2248cf32
|
|
@ -0,0 +1,40 @@
|
|||
#!/bin/sh -e
|
||||
mount -o remount,rw /
|
||||
|
||||
# Redirect all output to a log file
|
||||
exec > /data/log/rc.local.log 2>&1
|
||||
# Set root password non-interactively
|
||||
echo "Setting root password..."
|
||||
echo "root:salidomo" | /usr/sbin/chpasswd
|
||||
|
||||
# Check the exit status of chpasswd
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "Root password set successfully."
|
||||
else
|
||||
echo "Failed to set root password."
|
||||
fi
|
||||
|
||||
# Remove existing timezone link (if it exists)
|
||||
if [ -L /etc/localtime ]; then
|
||||
echo "Removing existing timezone link..."
|
||||
rm /etc/localtime
|
||||
fi
|
||||
|
||||
# Create a symbolic link to the desired timezone
|
||||
echo "Creating symbolic link to timezone..."
|
||||
ln -sf /usr/share/zoneinfo/Europe/Paris /etc/localtime
|
||||
|
||||
# Set VPN service symlink
|
||||
echo "Creating symbolic link to VPN service..."
|
||||
find /data/innovenergy/openvpn -type f -exec chmod 777 {} \;
|
||||
vpn_service_path="/data/innovenergy/openvpn/service"
|
||||
vpn_symlink_path="/service/openvpn"
|
||||
ln -s "$vpn_service_path" "$vpn_symlink_path"
|
||||
|
||||
# # Set EmuMeter service symlink
|
||||
# echo "Creating symbolic link to EmuMeter service..."
|
||||
# EmuMeter_service_path="/data/EmuMeter/service"
|
||||
# EmuMeter_symlink_path="/service/EmuMeter"
|
||||
# ln -s "$EmuMeter_service_path" "$EmuMeter_symlink_path"
|
||||
|
||||
exit 0
|
||||
Loading…
Reference in New Issue