termux-connecting 1.1.35 → 1.1.36

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -256,8 +256,11 @@ cmd_connection() {
256
256
  echo " Nanti cukup: ssh ${HOST_ALIAS}"
257
257
  echo ""
258
258
  mkdir -p "$HOME/.ssh"
259
- if ! grep -q "Host $HOST_ALIAS$" "$HOME/.ssh/config"; then
260
- cat >> "$HOME/.ssh/config" << EOF
259
+ # Hapus blok config lama jika ada, lalu tulis ulang
260
+ if [ -f "$HOME/.ssh/config" ]; then
261
+ sed -i '' "/^Host $HOST_ALIAS$/,/^$/d" "$HOME/.ssh/config" 2>/dev/null || true
262
+ fi
263
+ cat >> "$HOME/.ssh/config" << EOF
261
264
 
262
265
  Host $HOST_ALIAS
263
266
  HostName $SSH_HOST
@@ -267,11 +270,8 @@ Host $HOST_ALIAS
267
270
  StrictHostKeyChecking no
268
271
  UserKnownHostsFile /dev/null
269
272
  EOF
270
- chmod 600 "$HOME/.ssh/config"
271
- info "SSH config siap: ssh $HOST_ALIAS"
272
- else
273
- info "Host '$HOST_ALIAS' sudah ada di SSH config"
274
- fi
273
+ chmod 600 "$HOME/.ssh/config"
274
+ info "SSH config siap: ssh $HOST_ALIAS"
275
275
 
276
276
  # ── Telegram ──
277
277
  title "4. Telegram Alert (opsional)"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "termux-connecting",
3
- "version": "1.1.35",
3
+ "version": "1.1.36",
4
4
  "description": "CLI setup Termux + koneksi SSH dari PC/Mac dengan Telegram alert",
5
5
  "bin": {
6
6
  "termux-connecting": "bin/termux-connecting",