Compare commits
No commits in common. "16fbf5dc41fefe156ef566731e4636ef67f31db4" and "afef2e35915faa1fe661f47421ae0d2a88fac884" have entirely different histories.
16fbf5dc41
...
afef2e3591
|
@ -1,38 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# A script to change the current username
|
|
||||||
|
|
||||||
# Get current username
|
|
||||||
printf "\nType the current username:\n"
|
|
||||||
read old
|
|
||||||
|
|
||||||
# Set desired username
|
|
||||||
printf "\nType the desired username:\n"
|
|
||||||
read new
|
|
||||||
|
|
||||||
# Home paths
|
|
||||||
ohp="home/$old"
|
|
||||||
nhp="home/$new"
|
|
||||||
|
|
||||||
# Change username
|
|
||||||
printf "\nChanging username\n"
|
|
||||||
|
|
||||||
for file in group gshadow passwd shadow subgid subuid
|
|
||||||
do
|
|
||||||
sed -i "s/$old/$new/g" /etc/$file*
|
|
||||||
done
|
|
||||||
|
|
||||||
# Rename home folder
|
|
||||||
mv /$ohp /$nhp
|
|
||||||
|
|
||||||
# Fix path references in /home for new user
|
|
||||||
printf "\nAdjusting paths in home directory\n"
|
|
||||||
|
|
||||||
grep -rl "$ohp" /$nhp | xargs sed -i "s+$ohp+$nhp+g"
|
|
||||||
|
|
||||||
# Set user info
|
|
||||||
echo
|
|
||||||
chfn $new
|
|
||||||
sync
|
|
||||||
|
|
||||||
reboot
|
|
30
mms-check
30
mms-check
|
@ -1,30 +0,0 @@
|
||||||
#!/usr/bin/perl
|
|
||||||
|
|
||||||
# Check ModemManager for pending SMS/MMS messages clogging its queue.
|
|
||||||
# Until mobile Linux natively supports MMS messages, ModemManager is
|
|
||||||
# needed along with Janky MMS (https://git.sr.ht/~amindfv/jmms) to get
|
|
||||||
# your messages and flush the queue; if the queue gets clogged you don't
|
|
||||||
# get incoming messages anymore.
|
|
||||||
|
|
||||||
# Usage: run this in your .bashrc so it'll print in your new terminal
|
|
||||||
# session to remind you that messages are pending.
|
|
||||||
|
|
||||||
use 5.12.0;
|
|
||||||
use strict;
|
|
||||||
use warnings;
|
|
||||||
|
|
||||||
# Find modem ID
|
|
||||||
my $modem;
|
|
||||||
my $list = `mmcli -L`;
|
|
||||||
if ($list =~ m{/Modem/(\d+)}i) {
|
|
||||||
$modem = $1;
|
|
||||||
} else {
|
|
||||||
die "didn't find modem id";
|
|
||||||
}
|
|
||||||
|
|
||||||
my $chk = `mmcli -m $modem --messaging-list-sms`;
|
|
||||||
my @lines = split(/\n/, $chk);
|
|
||||||
if ($chk !~ /no sms messages were found/i) {
|
|
||||||
say "Notice: mmcli shows there are pending SMS messages:";
|
|
||||||
say $chk;
|
|
||||||
}
|
|
11
mms-read
11
mms-read
|
@ -1,11 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# Wrapper for Jenky MMS (https://git.sr.ht/~amindfv/jmms)
|
|
||||||
# Until MMS is natively supported in mobile Linux, this command
|
|
||||||
# will use jmms to read your pending MMS messages. For this to
|
|
||||||
# work the WiFi needs switched off as only the 4G LTE connection
|
|
||||||
# has authentication to read from (T-Mobile's) servers.
|
|
||||||
|
|
||||||
sudo nmcli radio wifi off
|
|
||||||
jmms --get
|
|
||||||
sudo nmcli radio wifi on
|
|
Loading…
Reference in New Issue
Block a user