Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanup of a couple of init scripts #12

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions init/ninjablock.conf
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ pre-start script

# setup serial port for BBW
if [ "$NINJA_HARDWARE_TYPE" == "BBW" ]; then
sudo $bin_dir/setserial
$bin_dir/setserial
fi

# configure gpio pins
sudo $bin_dir/setgpio
$bin_dir/setgpio

if [ ! -f /etc/opt/ninja/.has_updated_system ]; then
$bin_dir/ninja_update_system
Expand All @@ -56,12 +56,12 @@ pre-start script
if [ ! -f /etc/opt/ninja/.has_updated_utilities ]; then
$bin_dir/ninja_update_utilities
fi
sudo echo "ubuntu ALL=NOPASSWD: /sbin/ifconfig, /sbin/iwlist" > /etc/sudoers.d/ninja
sudo chmod 0440 /etc/sudoers.d/ninja
sudo chown -R ubuntu:ubuntu /opt/ninja
sudo chown ubuntu:ubuntu /opt/utilities/tmp
sudo chown ubuntu:ubuntu /var/log/ninjablock.log
sudo chown ubuntu:ubuntu /etc/opt/ninja
echo "ubuntu ALL=NOPASSWD: /sbin/ifconfig, /sbin/iwlist" > /etc/sudoers.d/ninja
chmod 0440 /etc/sudoers.d/ninja
chown -R ubuntu:ubuntu /opt/ninja
chown ubuntu:ubuntu /opt/utilities/tmp
chown ubuntu:ubuntu /var/log/ninjablock.log
chown ubuntu:ubuntu /etc/opt/ninja
tail -n 1000 /var/log/ninjablock.log > /opt/utilities/tmp/new.log
cat /opt/utilities/tmp/new.log>/var/log/ninjablock.log
rm /opt/utilities/tmp/new.log
Expand Down
Empty file removed init/setgpio.conf
Empty file.
Empty file removed init/setserial.conf
Empty file.