bash

  1. daBee

    nginx Passenger Shell Logins && Associated Errors

    Hi folks. I hope this is the proper place for this thread. I have an nginx/Passenger/Sinatra situation. I've sent over a website to my server, and nginx has no user set. I've been told NOT to run it as root, but that's been highly disputed and it's never a clear answer. So because of...
  2. NapoleonWils0n

    Other Switch audio device script

    I just knocked up a little bash script to switch audio devices because i use i3wm instead of Desktop like gnome I have 3 audio devices, the built in speakers, headphones and a usb dac So i created a script to easily switch audio outputs called switch-audio, which lets you see the current...
  3. vermaden

    HOWTO: Ghost in the Shell - Part 2

    I would like to share HOWTO in Ghost in the Shell series about efficient working in the UNIX shell environment. Ghost in the Shell - Part 2 https://vermaden.wordpress.com/2018/07/08/ghost-in-the-shell-part-2/
  4. spython01

    Shell Duplicity backup script not running via cronjob

    I am running FreeBSD 11.1-RELEASE-p10 and trying to schedule a cronjob to run a daily script which will use duplicity to backup my ~/Documents directory to an Azure blob. The script (~/.duplicity/.backup1.sh) reads as follows: #!/bin/bash # the true variable values are in my real script...
  5. 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...
  6. I

    Can Java execute bash script by default?

    Can Java running on FreeBSD execute bash script by default? I'm getting this error: Caused by: java.io.IOException: Cannot run program "/exo/platform-public-distributions-develop/plf-community-tomcat-standalone/target/platform-community-5.0.x-SNAPSHOT/platform-community-5.0.x-SNAPSHOT/addon"...
  7. daBee

    Bash Login Profile Read Order

    I rely on a bunch of aliases and directives in my user (admin) ~/.bash_profile. I quite often have to enter superuser to get some stuff done efficiently. I would like to source /home/rich/.bash_profile but I am having no luck finding which file to shove that directive in for it to happen upon...
  8. daBee

    Exit to user from SU in bash script

    Is there a way I can initiate a script as root, then exit to my normal admin user (sudoers) to accomplish further tasks as the user? I tried exit but the script stopped completely. Things like RVM like to be installed using the user.
  9. Preacher

    Shell 'Garbage' output during script execution (via cron)

    I have this script which checks for updates on my host system and on my jails: #!/usr/local/bin/bash PATH="/sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/sbin:/usr/local/bin:/root/bin" # Updaten en rapporteren Ports Tree host system: portsnap cron update && { echo -e "Packages te...
  10. fullauto2012

    Shell Strange Bash problem

    While debugging a script I wrote for backups I noticed some strange problems. I snipped out the log directory sanity part of the script to show you and I'm hoping someone can shed some light on this... root@Washington:/usr/home/tim.falardeau/LOGS # ls 20160806.log 20160813.log 20160820.log...
  11. fullauto2012

    Solved Bash script - Keeping alive Authpf session

    I have a small network behind a static IP. That static IP is running with authpf anchors which redirect traffic through the firewall to the proper internal machine for rsync purposes. I one machine behind the firewall currently for testing and authpf is working fine... I am writing to script in...
  12. A

    Weird behaviour (df/mv command not found

    Hi guys/gals , I've upgraded my install after latest sec. advisories ( 10.3) and now I'm getting df : Command not found mv : Command not found PATH seems to be fine. Also calling it with /bin/df gives me the same output. Anyone with the same problem?
  13. G

    Searching issue

    Hi everybody! First up, sorry for my bad English. I don't found a simply way to collect the Apache errorlog's old directories... I have FreeBSD 9.1 with Bash. The Apache error logs are within each domain directory (for the users): /domains/[domain]/errorlog/[YEAR]/[month]/[day] I need a...
  14. fullauto2012

    Shell Bash Script Anomoly

    root@Washington:/var/SNAPSHOTS # uname -a FreeBSD Washington.XXXXXXXXX.XXX 10.1-RELEASE FreeBSD 10.1-RELEASE #0 r274401: Tue Nov 11 21:02:49 UTC 2014 root@releng1.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC amd64 root@Washington:/var/SNAPSHOTS # bash -version GNU bash, version...
  15. daBee

    sudo su Login Bash Shell

    Hi folks. I'm trying to set some root aliases in .bash_profile, but they are not loading when I sudo su. So, that file isn't being loaded, even though I'm in the bash shell. In ~ I have the following options so far: -rw------- 1 root wheel 797 Dec 26 12:42 .bash_history -rw-r--r-- 1...
Back
Top