On Wed, Mar 04, 2015 at 07:41:42AM -0700, Kevin Fenzi wrote:
There's 2 issues with our sobby server:
1. It doesn't autosave/remember old documents that it has after
restarting.
2. The git repo it has hasn't had any commits since 2013. ;)
The following fixes both of those issues hopefully (Although I might
need to tweak it a little as I have not tested it). For the autosave,
we pass the autosave file on the command line when starting. For the
git commits, it was using a link to /srv/sobby/sobby-commit, but /srv
is noexec so that didn't work. This change instead adds a
post-save-hook to just commit after every save.
+1s? should be a minor issue if gobby is down or needs to be reverted
back to it's current state.
kevin
--
diff --git a/modules/sobby/files/sobby.init b/modules/sobby/files/sobby.init
index 42808cc..c246df4 100755
--- a/modules/sobby/files/sobby.init
+++ b/modules/sobby/files/sobby.init
@@ -32,7 +32,7 @@ start() {
[ -x $exec ] || exit 5
[ -f $config ] || exit 6
echo -n $"Starting $prog: "
- daemon --user sobby "$exec -c $config &"
+ daemon --user sobby "$exec -c $config
--post-save-hook=/usr/local/bin/sobby-commit /srv/sobby/autosave.obby &"
retval=$?
echo
[ $retval -eq 0 ] && touch $lockfile
diff --git a/modules/sobby/manifests/init.pp b/modules/sobby/manifests/init.pp
index b39f5a8..ff360dc 100644
--- a/modules/sobby/manifests/init.pp
+++ b/modules/sobby/manifests/init.pp
@@ -33,7 +33,7 @@ class sobby {
source => "puppet:///sobby/sobby.init",
}
- file { "/srv/sobby/sobby-commit":
+ file { "/usr/local/bin/sobby-commit":
owner => "root",
group => "root",
mode => 0755,
@@ -53,9 +53,4 @@ class sobby {
mode => 0755,
ensure => directory,
}
-
- file { "/etc/cron.hourly/sobby-commit":
- ensure => link,
- target => "/srv/sobby/sobby-commit",
- }
}
+1 for me as well
Pierre