You are not logged in.
im atempting to write a script to install mpd just to make it simple on myself cause i switch distro's alot figured it would make life simple
#!/bin/sh
apt-get update
#mpd
apt-get install mpd mpc
#configure mpd
sudo service mpd stop
sudo update-rc.d mpd disable
#directories
mkdir -p ~/.mpd/playlists
sudo gunzip -c /usr/share/doc/mpd/examples/mpd.conf.gz > ~/.mpd/mpd.conf
touch ~/.mpd/{mpd.db,mpd.log,mpd.pid,mpdstate}
doesn't create the files with the touch cammand but does if i run it with bash -xv
Say your prayer's,Eat your vitamins....AND WHAT YOU GONNA DO BROTHA
Offline
NVM, didn't read properly.
Last edited by Unia (2012-10-10 17:26:00)
If you can't sit by a cozy fire with your code in hand enjoying its simplicity and clarity, it needs more work. --Carlos Torres
Github || Deviantart
Offline
The 'sh' - dash - does not recognize the {arg1,arg2, } notation, bash does.
bootinfoscript - emacs primer - I ♥ #!
Offline
The 'sh' - dash - does not recognize the {arg1,arg2, } notation, bash does.
still learning this so that was was like latin
Say your prayer's,Eat your vitamins....AND WHAT YOU GONNA DO BROTHA
Offline
Aka change #!/bin/sh to #!/bin/bash
If you can't sit by a cozy fire with your code in hand enjoying its simplicity and clarity, it needs more work. --Carlos Torres
Github || Deviantart
Offline
Aka change #!/bin/sh to #!/bin/bash
i feel quite dumb now lmao
Say your prayer's,Eat your vitamins....AND WHAT YOU GONNA DO BROTHA
Offline
Remove sudo here:
sudo gunzip -c /usr/share/doc/mpd/examples/mpd.conf.gz > ~/.mpd/mpd.conf Otherwise the file will be owned by root. And you don't need sudo privileges to extract stuff from /usr/share/doc. So:
gunzip -c /usr/share/doc/mpd/examples/mpd.conf.gz > ~/.mpd/mpd.confBut his won't work either, as the default configuration has the playlist, database and other files in /var/lib or somewhere. You need a user specific config. So upload one to dropbox or a VCS and add that to the script.
Offline
i cheated and just built a dedicated mpd box
Say your prayer's,Eat your vitamins....AND WHAT YOU GONNA DO BROTHA
Offline
Copyright © 2012 CrunchBang Linux.
Proudly powered by Debian. Hosted by Linode.
Debian is a registered trademark of Software in the Public Interest, Inc.