Skip to content

Commit

Permalink
Refactor update functions in sys.sh for clarity and consistency
Browse files Browse the repository at this point in the history
  • Loading branch information
caothu159 committed Jan 16, 2025
1 parent 8efef86 commit 1599d81
Showing 1 changed file with 15 additions and 4 deletions.
19 changes: 15 additions & 4 deletions src/var/lib/sys.sh
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,25 @@ net.ipv4.ip_forward=1"
sed -i "/bash\/.bash_aliases/d" ~/.bash_aliases
}

--selfupdate() {
d_selfupdate() {
[[ "$1" == "--help" ]] &&
echo "Update script latest version" &&
return
--sys:upgrade
ductn sys:init
# ductn sys:init
}

d_self-update() {
[[ "$1" == "--help" ]] &&
echo "Update script latest version" &&
return
--sys:upgrade
# ductn sys:init
}

--sys:upgrade() {
sudo apt update
sudo apt install --only-upgrade ductn -y --purge --auto-remove
$SUDO apt update
$SUDO apt install --only-upgrade ductn -y --purge --auto-remove
# ductn sys:init
# ductn sys:clean
# ductn sys:service:re-install
Expand Down

0 comments on commit 1599d81

Please # to comment.