script

  1. Cath O'Deray

    Hints: using script(1) or vidcontrol(1) when scrollback is insufficient

    With (for example) a virtual terminal such as ttyv1, it's sometimes impossible to see what's required. A command like this, following a major upgrade to base, might summarise a number of (port) packages to be removed, without allowing you to see the name of any such package: pkg upgrade...
  2. Sergei_Shablovsky

    Shell cron script/utility to make screenshots and periodically emailing

    HI, FreeBSD Gurus ! Please suggest me tool/sys utility/script that : - constantly running in a background under root privilege; - saving local-attached terminal (monitor on server's VGA output, no any GUI used) screenshot to destination folder; - periodically (hourly or daily, or certain day of...
  3. E

    could not get PID in a script

    Hi All, In my script, I am trying to get the PID ID of the following process: 30679 0 SJ 0:01.47 node: homebridge (node). I have tried pidof, pgrep and ps but I can't find a way to get the correct PID. there are multiple node processes, when i use pidof node i get more than 1 pid. Does...
  4. S

    FreeBSD Setup Script

    Hi everyone. I've recently started learning bash scripting and I thought it might be useful to try and automate installing most common stuff like xorg, de, wifi, etc. Because of that I've created a relatively simple script which automates these tasks. I'm open to any feedback and discussion...
  5. T

    IPFW IPFW server, acting as a firewall (how to pass traffic ?)

    Hello everyone, Experimenting IPFW, I would really appreciate some help to improve my abilities ! I actually know how to use it as a workstation firewall, but now, I would like to learn how to use it as an easy full firewall (just for experimenting). Here is an easy network map describing what...
  6. Sergei_Shablovsky

    Bash script to automate installing bunch of packages

    Dear FreeBSD Gurus! Please share bash script to automate installing bunch of packages without any user interaction in a process. Let me write a little bit of details what I need exactly: pkg_autoinstaller_list.txt - text file that contain name of packages that I would to install. Each name in...
  7. M

    Shell Script for rebooting if network down for a certain amount of time?

    Today in the morning I have discovered that my server running 13.0-RELEASE-p6 wasn't reachable anymore, which left me no other choice then to perform a hardware reset, after which everything was working again. It started during the night with re0 losing connection and toggling link state between...
  8. Clippers

    Shell Received Segmentation Fault after writing a Shell Script - FreeBSD13 Stable

    I was following an example found in: Practical rc.d scripting in BSD - at https://docs.freebsd.org/en/articles/rc-scripting/ ...and the 1st example, shows the "dummy" script. So, I reproduced the script in /etc/rc.conf.d, then I corrected errors, set the execute bit, and made a run. # start...
  9. M

    Shell Script for splitting PDF pages vertically, removing blank pages and white borders

    So I'm trying to process PDF documents containing shipping labels the following way: Each A4 page in landscape orientation contains two A5 shipping labels side by side, so simply split each A4 page vertically into two A5 pages. Remove any blank pages. Remove white borders from each page. I...
  10. F

    Solved Using rc.d script with /usr/sbin/daemon to start and stop a script

    I am trying to write an rc.d script to start and stop a (Python) script. Starting the command seems to be working, but stopping it is not yet the way I want. My goal is to ensure the script receives a SIGTERM signal when it should shut down; that seems not to be the case; I think only the...
  11. Spity

    Solved Help to run a simple script on startup

    How can run this script on startup? #!/bin/bash sudo kldload fuse sudo ntfs-3g /dev/ada2s1 /mnt/ -o -ro xdg-open /mnt/ &> /dev/null
  12. Márcio Rezende

    Solved Dialog: prgbox there is no output (no echoing output)

    Hi, pals. I'm trying to convert an old bash script that runs normally in cygwin and linux. For some reason the same command is not working on my FreeBSD box. It is just one line that supose to echo command output when used with command dialog --prgbox. If I use eval to execute bash (forking...
  13. Sergei_Shablovsky

    How to see which NIC is installed in which PCI slot by script ?

    Hi, FreeBSD guru! Is it possible at all to see which NIC is installed in which PCI slot by script ? As I know this may be something near the dmidecode and pciconf commands. But interesting to determine which exactly motherboard PCI slot are used for which NIC. I know that different...
  14. T

    Shell How to parse a text file?

    I am looking to parse a file for specific content that is on a line that always has a specific beginning, for example: "Program: code" I want to extract code on the line that starts with Program. I then want to add that extracted string into an already created file. Can anyone provide some...
  15. laundryboy

    Automating Transmission(Torrent) to use VPN while everything else uses standard connection.

    I've wanted to write up a tutorial on how to script the set up for getting Transmission to use a VPN connection, including inbound connections but havent had much time until now. I've read many articles using jails(I dont use jails), other distros and all of that helped me get it working on my...
  16. fullauto2012

    Shell DB backup Script

    Not real good with scripting. But, I through my hat in the ring. I was in dire need of a DB backup script that wrote to an inserted, but mostly unmounted rdx drive, regardless of mount situation. I also needed it to keep sanity in that backups older than 30 days needed to be pruned. Logs needed...
  17. Josh Rea

    Solved Shell Scripting Output to File and Screen

    Hello all, I wrote a script to direct all output to a log file, but I'd like to echo certain things during the process of the script to screen output if I can. I haven't been able to find anything related to this searching online, and the man page for sh is cryptic for me (as of now). Sample of...
  18. igorino

    Other Remove "...[C[0k" from expect output

    Dear all, How can I not generate the substring ...[C[C[C[0k after issued comands trough expect scripts? For example, I have the following lines in an expect script: #set variables, parameters etc ... spawn telnet $IP $PORT expect -nocase "name:" send -- "$USER\r" expect -nocase "password:" send...
  19. F

    Setup Script to run at boot using crontab?

    Hi, So I'm trying to set a script, so it starts on boot. The problem is, I'm using "@reboot" and I don't think that is working. I have: Tried modifying /etc/crontab as root using crontab -e -u syncthing tried various commands, IE: "@restart touch /home/syncthing/test" I have surfed the net...
  20. monchito

    Run Python Script -

    Hi all, i'm brand new on FreeBSD, i want to run a python script for pfsense firewall running on FreeBSD (FreeBSD 10.3-RELEASE-p9) this is the script https://github.com/edgauthier/pfsense-backup I already installed beautifulsoup4 (py27-beautifulsoup-4.4.1) So, when i make this as root ...
Back
Top