Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
pls-pnv
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
plaasio
pls-pnv
Commits
8e5f1b96
Commit
8e5f1b96
authored
Nov 13, 2019
by
plaasio
👷🏽
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add new file
parent
97e51da7
Pipeline
#173
canceled with stages
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
64 additions
and
0 deletions
+64
-0
edison-oaps.sh
edison-oaps.sh
+64
-0
No files found.
edison-oaps.sh
0 → 100644
View file @
8e5f1b96
#!/bin/bash
set
-e
read
-p
"enter PNV username: "
-r
unm
=
$REPLY
echo
$unm
>
/etc/hostname
sed
-r
-i
""
"s/localhost( jubilinux)?
$/
localhost
$unm
/"
/etc/hosts
sed
-r
-i
""
"s/127.0.1.1.*
$/
127.0.1.1
$unm
/"
/etc/hosts
# if passwords are old, force them to be changed at next login
passwd
-S
edison 2>/dev/null |
grep
20[01][0-6]
&&
passwd
-e
root
# automatically expire edison account if its password is not changed in 3 days
passwd
-S
edison 2>/dev/null |
grep
20[01][0-6]
&&
passwd
-e
edison
-i
3
if
[
-e
/run/sshwarn
]
;
then
echo
Please
select
a secure password
for
ssh logins to your rig:
echo
'For the "root" account:'
passwd root
echo
'And for the "pi" account (same password is fine):'
passwd pi
fi
grep
"PermitRootLogin yes"
/etc/ssh/sshd_config
||
echo
"PermitRootLogin yes"
>
/etc/ssh/sshd_config
# set timezone
dpkg-reconfigure tzdata
#Workarounds for Jubilinux v0.2.0 (Debian Jessie) migration to LTS
if
cat
/etc/os-release |
grep
'PRETTY_NAME="Debian GNU/Linux 8 (jessie)"'
&> /dev/null
;
then
#Disable validity check for archived Debian repos
echo
"Acquire::Check-Valid-Until false;"
|
tee
-a
/etc/apt/apt.conf.d/10-nocheckvalid
#Replace apt sources.list with new archive.debian.org locations
echo
-e
"deb http://security.debian.org/ jessie/updates main
\n
#deb-src http://security.debian.org/ jessie/updates main
\n\n
deb http://archive.debian.org/debian/ jessie-backports main
\n
#deb-src http://archive.debian.org/debian/ jessie-backports main
\n\n
deb http://archive.debian.org/debian/ jessie main contrib non-free
\n
#deb-src http://archive.debian.org/debian/ jessie main contrib non-free"
>
/etc/apt/sources.list
fi
#Workaround for Jubilinux to install nodejs/npm from nodesource
if
getent passwd edison &> /dev/null
;
then
#Use nodesource setup script to add nodesource repository to sources.list.d
curl
-sL
https://deb.nodesource.com/setup_8.x | bash -
fi
#dpkg -P nodejs nodejs-dev
# TODO: remove the `-o Acquire::ForceIPv4=true` once Debian's mirrors work reliably over IPv6
apt-get
-o
Acquire::ForceIPv4
=
true
update
&&
apt-get
-o
Acquire::ForceIPv4
=
true
-y
dist-upgrade
&&
apt-get
-o
Acquire::ForceIPv4
=
true
-y
autoremove
apt-get
-o
Acquire::ForceIPv4
=
true
update
&&
apt-get
-o
Acquire::ForceIPv4
=
true install
-y
sudo
strace tcpdump screen acpid vim python-pip locate ntpdate
#check if edison user exists before trying to add it to groups
if
getent passwd edison
>
/dev/null
;
then
echo
"Adding edison to sudo users"
adduser edison
sudo
echo
"Adding edison to dialout users"
adduser edison dialout
# else
# echo "User edison does not exist. Apparently, you are runnning a non-edison setup."
fi
sed
-i
"s/daily/hourly/g"
/etc/logrotate.conf
sed
-i
"s/#compress/compress/g"
/etc/logrotate.conf
curl
-s
https://raw.githubusercontent.com/openaps/oref0/master/bin/openaps-packages.sh | bash -
mkdir
-p
~/src
;
cd
~/src
&&
git clone git://github.com/openaps/oref0.git
||
(
cd
oref0
&&
git checkout master
&&
git pull
)
echo
"Press Enter to run oref0-setup with the current release (master branch) of oref0,"
read
-p
"or press ctrl-c to cancel. "
-r
cd
&&
~/src/oref0/bin/oref0-setup.sh
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment