-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #17 from OSDLabs/dev
Allow using multiple accounts! Fix #14
- Loading branch information
Showing
4 changed files
with
64 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,28 @@ | ||
# Set defaults here | ||
username='f2015022' | ||
password='myPass' | ||
# | ||
# This file is for the user configuration | ||
# Set some username and passwords according to you priority | ||
# | ||
# eg: if you have 2 IDs with 'ID1' being the most used, | ||
# then write this: | ||
# | ||
# username[1]='ID1' | ||
# password[1]='ID1_password' | ||
# username[2]='ID2' | ||
# password[2]='ID2_password' | ||
# | ||
# Use can use UNLIMITED ID and password combinations | ||
|
||
username[1]='f2015022' | ||
password[1]='myPass' | ||
|
||
username[2]='f2015023' | ||
password[2]='myPass2' | ||
|
||
# | ||
# Configure features | ||
|
||
# Always force login: | ||
# change to '1' to always use autologin | ||
f=0 | ||
|
||
login_url='https://10.1.0.10:8090/httpclient.html' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,49 @@ | ||
#!/bin/sh | ||
|
||
echo "Installing BITSnet Login" | ||
|
||
# Check if wget installed | ||
echo "Checking if wget installed" | ||
if ! which wget > /dev/null ; then | ||
echo "wget not installed" | ||
exit | ||
fi | ||
# Check if git installed for update | ||
echo "Checking if git installed" | ||
if ! which git > /dev/null ; then | ||
echo "git not installed" | ||
exit | ||
fi | ||
# Check if nmcli installed | ||
echo "Checking if nmcli installed" | ||
if ! which nmcli > /dev/null ; then | ||
echo "nmcli not installed" | ||
exit | ||
fi | ||
|
||
# Copy config file to the right place | ||
if ! ls -a ~ | grep .bitsnetrc > /dev/null ; then | ||
if ! ls -a ~ | grep -x ".bitsnetrc" --quiet ; then | ||
echo "Copying bitsnetrc" | ||
cp ./bitsnetrc ~/.bitsnetrc | ||
fi | ||
|
||
# Copy the script to executables | ||
if [ ! -d ~/.local/lib/bitsnet ]; then | ||
mkdir ~/.local/lib/bitsnet | ||
fi | ||
echo "Copying script" | ||
cp ./util.sh ~/.local/lib/bitsnet/util.sh | ||
cp ./bitsnet ~/.local/bin/bitsnet | ||
|
||
# Create a desktop file | ||
echo "Creating app launcher" | ||
cp ./bitsnet.desktop ~/.local/share/applications/bitsnet.desktop | ||
|
||
# Set to autostart | ||
echo "Setting up autologin" | ||
if [ ! -d ~/.config/autostart ]; then | ||
mkdir -p ~/.config/autostart | ||
fi | ||
ln -sf ~/.local/share/applications/bitsnet.desktop ~/.config/autostart/bitsnet.desktop | ||
|
||
# Create a man page | ||
# To Be Done | ||
# TODO: Create a man page |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters