Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

@pirateship/cli

Package Overview
Dependencies
Maintainers
9
Versions
65
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@pirateship/cli - npm Package Compare versions

Comparing version
0.3.6-wificountry0
to
0.3.6-wificountry4
+1
-0
lib/scripts/default.sh

@@ -9,4 +9,5 @@ #!/bin/bash

rm -rf /etc/network/interfaces.d/*
rm -rf /etc/rpi-wifi-country
pirateship rename raspberrypi
systemctl disable hostapd || true
systemctl disable dnsmasq || true

@@ -14,1 +14,3 @@ #!/bin/bash

fi
echo $COUNTRY > /etc/rpi-wifi-country
+32
-14

@@ -34,6 +34,6 @@ #!/usr/bin/env node

var system_wpa_supplicant = '/etc/wpa_supplicant/wpa_supplicant.conf'
var system_wifi_country = '/etc/rpi-wifi-country'
if (password === undefined) {
var network = `
network={
var network = `network={
ssid="` + ESSID + `"

@@ -48,9 +48,18 @@ key_mgmt=NONE

wpa_supplicant_conf = data + network
fs.writeFile(system_wpa_supplicant, wpa_supplicant_conf, 'utf8', err => {
if (err) {
console.log(err)
var wifiCountry = "US"
fs.readFile(system_wifi_country, (err, countryData) => {
if (countryData) {
wifiCountry = countryData.toString().trim();
}
ifdownup('open wifi network')
});
data = data.toString().trim()
wpa_supplicant_conf = data + "\ncountry=" + wifiCountry + "\n" + network
fs.writeFile(system_wpa_supplicant, wpa_supplicant_conf, 'utf8', err => {
if (err) {
console.log(err)
}
ifdownup('open wifi network')
});
})
});

@@ -70,9 +79,18 @@ } else {

wpa_supplicant_conf = data + stdout
fs.writeFile(system_wpa_supplicant, wpa_supplicant_conf, 'utf8', err => {
if (err) {
console.log(err)
var wifiCountry = "US"
fs.readFile(system_wifi_country, (err, countryData) => {
if (countryData) {
wifiCountry = countryData.toString().trim();
}
ifdownup('password network')
})
data = data.toString().trim()
wpa_supplicant_conf = data + "\ncountry=" + wifiCountry + "\n" + stdout
fs.writeFile(system_wpa_supplicant, wpa_supplicant_conf, 'utf8', err => {
if (err) {
console.log(err)
}
ifdownup('password network')
})
});
});

@@ -79,0 +97,0 @@ });

{
"name": "@pirateship/cli",
"version": "0.3.6-wificountry0",
"version": "0.3.6-wificountry4",
"description": "Thin command-line interface for Raspberry Pi low level configuration.",

@@ -5,0 +5,0 @@ "main": "cli.js",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet