Go to advanced search

by rossoreed
Sun Feb 28, 2016 11:55 pm
Forum: General discussion
Topic: Bash script stops after 5 minutes
Replies: 2
Views: 931

Re: Bash script stops after 5 minutes

Thanks, I haven't got my head around the systemd.service, it doesn't seem well documented for the less-technical (like me!), but yes the link that you provided does appear to be the issue.
I don't however understand what links the service file to the script. Is it ExecStart?
by rossoreed
Sun Feb 28, 2016 9:54 pm
Forum: General discussion
Topic: Bash script stops after 5 minutes
Replies: 2
Views: 931

Bash script stops after 5 minutes

I have written a bash script (as part of a bigger project) which is run via a init.d process following a system reboot. The script is intended to just run once, and is then deleted, but some of the commands in the script take a long time to execute - such as extending the partition filesystem (resiz...
by rossoreed
Sun Jan 24, 2016 10:26 pm
Forum: General discussion
Topic: Rounding in a bash script
Replies: 4
Views: 755

Re: Rounding in a bash script

OK thanks, I'll look at plan B!

Paul
by rossoreed
Sun Jan 24, 2016 4:59 pm
Forum: General discussion
Topic: Rounding in a bash script
Replies: 4
Views: 755

Rounding in a bash script

I'm writing a bash script which provides data about the SD card, and I've run into this issue. (sorry if it's a basic mistake) If I run; $sudo blockdev --getsz /dev/mmcblk0 I get the correct answer - 15130624 But if I combine it with some calculations; DISK_SIZE="$(($(sudo blockdev --getsz /dev/mmcb...
by rossoreed
Thu Dec 31, 2015 10:54 am
Forum: General discussion
Topic: Combining commands in bash script
Replies: 11
Views: 1571

Re: Combining commands in bash script

Yes I'm aware of that, but as I want the logs to be in tmpfs, I would still need to create empty log files with the correct permissions set for MySQL to write to, as it can't create them itself. Same with Redis.
by rossoreed
Thu Dec 31, 2015 10:05 am
Forum: General discussion
Topic: Combining commands in bash script
Replies: 11
Views: 1571

Re: Combining commands in bash script

Tmpfs appears to mount ok, but the issues are that MYSQL expects to find the /var/log/mysql folder structure and also it's mysql.log & error.log files. If they are not present, MySQL cannot create them and errors. Same applies with Redis. I want to get the logs into tmpfs to extend the life of a sys...
by rossoreed
Wed Dec 30, 2015 11:07 pm
Forum: General discussion
Topic: Combining commands in bash script
Replies: 11
Views: 1571

Re: Combining commands in bash script

What if the command requires a value, such as 'chown mysql:adm' or requires sudo to execute?
I don't seem to get that working despite putting the command within double quotes ""sudo chown mysql:adm""

Paul
by rossoreed
Tue Dec 29, 2015 11:52 pm
Forum: General discussion
Topic: Combining commands in bash script
Replies: 11
Views: 1571

Re: Combining commands in bash script

Well Dirk 'S answer seems to work OK, but it seemed to get very blurred thereafter!

In (very) basic terminology, is Dirk's reply the way to go?
by rossoreed
Tue Dec 29, 2015 7:46 pm
Forum: General discussion
Topic: Combining commands in bash script
Replies: 11
Views: 1571

Combining commands in bash script

I'm creating a rc.local script to create directories, empty files & permissions in a tmpfs volume, and found that I've got each command on a separate line. Is there a way I can combine commands, similar to: $ sudo mkdir /var/log/{redis,apache2,mysql} (I tried that and it didn't work!) sudo mkdir /va...
by rossoreed
Sun Dec 27, 2015 4:55 pm
Forum: Beginners
Topic: /var/log mounted in tmpfs
Replies: 2
Views: 948

Re: /var/log mounted in tmpfs

rpdom, sorry it's taken so long to reply, but thanks, that's a great solution and it works very well.
Exactly what I was looking for.

Paul
by rossoreed
Sun Dec 20, 2015 9:59 pm
Forum: Beginners
Topic: /var/log mounted in tmpfs
Replies: 2
Views: 948

/var/log mounted in tmpfs

I'm writing a script which will be used on Raspberry Pi's that will be configured in 2 ways; a) Pi's that are have /var/log mounted on a physical drive b) Pi's that have their /var/log mounted as tmpfs I need a conditional statement that will differentiate between the 2, so if /var/log is mounted in...
by rossoreed
Thu Nov 26, 2015 5:13 pm
Forum: Raspberry Pi OS
Topic: What's new in Jessie 21/11/2015 ?
Replies: 31
Views: 5767

Re: What's new in Jessie 21/11/2015 ?

It would be good to know what the difference is between Jessie & Jessie Lite, hopefully the release notes will give us a clue.
by rossoreed
Sun Aug 30, 2015 8:07 pm
Forum: Troubleshooting
Topic: Unhandled prefetch abort: breakpoint debug exception (0x002)
Replies: 2
Views: 2013

Re: Unhandled prefetch abort: breakpoint debug exception (0x

Sorry for the 'bump', has anyone any ideas how I can sort this please.
by rossoreed
Fri Aug 28, 2015 7:10 pm
Forum: Troubleshooting
Topic: Unhandled prefetch abort: breakpoint debug exception (0x002)
Replies: 2
Views: 2013

Unhandled prefetch abort: breakpoint debug exception (0x002)

I'm wanting to replace my RP v1 with a RP v2. My v1 raspberry Pi is running Raspbian, and has its root moved to a USB HDD, and it runs quite a bit of software, so if possible I would like to avoid a new OS installation if at all possible. To prepare the v1 OS for moving to a v2 device, I ran; sudo a...
by rossoreed
Tue Aug 18, 2015 5:45 pm
Forum: General discussion
Topic: Raspberry Pi 2 upgrade
Replies: 6
Views: 1499

Re: Raspberry Pi 2 upgrade

Yes, I am using the GPIO as I have a small adapter board fitted which uses a Hope RFM12B chip to receive/transmit 868mhz data from environmental sensors (temperature, humidity etc) which is then processed by the Pi, and published on my website. I've contacted the maker of the board who has confirmed...
by rossoreed
Mon Aug 17, 2015 9:47 pm
Forum: General discussion
Topic: Raspberry Pi 2 upgrade
Replies: 6
Views: 1499

Re: Raspberry Pi 2 upgrade

Thanks for the quick reply, I'll give that a try.
by rossoreed
Mon Aug 17, 2015 9:27 pm
Forum: General discussion
Topic: Raspberry Pi 2 upgrade
Replies: 6
Views: 1499

Raspberry Pi 2 upgrade

I currently have an original Raspberry Pi running my website, media server and other functions, and have moved the 'root' to a USB HDD, it's using Raspbian OS and is working very well. However, I have just purchased a Raspberry Pi 2, and want to re-use the original Raspberry Pi elsewhere. Are the tw...
by rossoreed
Thu Oct 30, 2014 9:32 pm
Forum: General discussion
Topic: Apache v2.4
Replies: 5
Views: 2868

Re: Apache v2.4

That sounds interesting, and having searched through some 'Jessie' forum posts, it seems that a lot have also changed over. I'm just cautious that it will break something that I can't fix! - having spent the previous 2 days trying to pin down a duff sd card (thanks for the help Dougie). I'll do a fu...
by rossoreed
Thu Oct 30, 2014 8:17 pm
Forum: General discussion
Topic: Apache v2.4
Replies: 5
Views: 2868

Apache v2.4

Apache 2.4 was released in July, yet v2.2 is still the default package for Raspberry Pi's. Is there a reason for this (I see on apache.org that they list v2.2 & v2.4 as current versions).

I ask because I'm interested in some of the new security features introduced in v2.4.

Paul
by rossoreed
Wed Oct 29, 2014 10:01 pm
Forum: Troubleshooting
Topic: NTFS partition refuses to mount after wheezy update
Replies: 17
Views: 5873

Re: NTFS partition refuses to mount after wheezy update

Thanks for the help everyone, we got there in the end! I downloaded a fresh image and copied the boot partition to a new SD card, edited the cmdline, and run sudo rpi-update now I get; pi@raspberrypi ~ $ uname -a Linux raspberrypi 3.12.31+ #718 PREEMPT Sat Oct 25 16:09:41 BST 2014 armv6l GNU/Linux p...
by rossoreed
Wed Oct 29, 2014 8:48 pm
Forum: Troubleshooting
Topic: NTFS partition refuses to mount after wheezy update
Replies: 17
Views: 5873

Re: NTFS partition refuses to mount after wheezy update

pi@raspberrypi ~ $ sudo fdisk -l Disk /dev/mmcblk0: 125 MB, 125698048 bytes 4 heads, 16 sectors/track, 3836 cylinders, total 245504 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier:...
by rossoreed
Wed Oct 29, 2014 8:30 pm
Forum: Troubleshooting
Topic: NTFS partition refuses to mount after wheezy update
Replies: 17
Views: 5873

Re: NTFS partition refuses to mount after wheezy update

I gave that a try; pi@raspberrypi /boot $ sudo rpi-update *** Raspberry Pi firmware updater by Hexxeh, enhanced by AndrewS and Dom *** Performing self-update % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 7635 100 7635 0 0 23426 0 --:--:-- --:...
by rossoreed
Wed Oct 29, 2014 7:27 pm
Forum: Troubleshooting
Topic: NTFS partition refuses to mount after wheezy update
Replies: 17
Views: 5873

Re: NTFS partition refuses to mount after wheezy update

OK, I've connected a TV to my pi, to see what shows up whilst booting. Everything seems to load OK until this point. [info] Loading kernel module snd-bcm2835 libkmod: ERROR ../libkmod/libkmod.c:554 kmod_search_moddep: could not open modep file '/lib/modules/3.12.22+/modules.dep.bin' [ok] Activating ...
by rossoreed
Wed Oct 29, 2014 5:24 pm
Forum: Troubleshooting
Topic: NTFS partition refuses to mount after wheezy update
Replies: 17
Views: 5873

Re: NTFS partition refuses to mount after wheezy update

I did run all of the commands as 'sudo', yet I'm still at v3.12.22+

Paul
by rossoreed
Wed Oct 29, 2014 5:16 pm
Forum: Troubleshooting
Topic: NTFS partition refuses to mount after wheezy update
Replies: 17
Views: 5873

Re: NTFS partition refuses to mount after wheezy update

What is the current kernel version please?

Looking at Github, could it be 3.13.31 ?

Go to advanced search